mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-11 02:30:41 +08:00
Ensure documentation has consistent relative links
Summary: Explain the **motivation** for making this change. What existing problem does the pull request solve? I had tried fixing a broken link in a previous commit (#11453). My commit was merged, but it did not resolve the underlying problem. I have looked into how links should be formed for the docs and have fixed the original problem as well as updated all other links to be consistent. Previous link formats: - /docs/sample.html <-- broken link - sample.html <-- broken link - https://facebook.github.io/react-native/docs/sample.html <-- works - /react-native/docs/sample.html <-- works - docs/sample.html <-- works (permalink format) This PR updates all links to the permalink format. **Test plan (required)** I ran the website locally and manually tested half of the links in each category. They all worked. ``` $ cd website $ npm install && npm start ``` Closes https://github.com/facebook/react-native/pull/12064 Differential Revision: D4489153 Pulled By: mkonicek fbshipit-source-id: bf0231d941ba147317595c3b3466dc579a887169
This commit is contained in:
committed by
Facebook Github Bot
parent
4344e064e7
commit
8378f0f9f7
@@ -8,7 +8,7 @@ next: using-a-scrollview
|
||||
previous: flexbox
|
||||
---
|
||||
|
||||
[`TextInput`](/react-native/docs/textinput.html#content) is a basic component that allows the user to enter text. It has an `onChangeText` prop that takes
|
||||
[`TextInput`](docs/textinput.html#content) is a basic component that allows the user to enter text. It has an `onChangeText` prop that takes
|
||||
a function to be called every time the text changed, and an `onSubmitEditing` prop that takes a function to be called when the text is submitted.
|
||||
|
||||
For example, let's say that as the user types, you're translating their words into a different language. In this new language, every single word is written the same way: 🍕. So the sentence "Hello there Bob" would be translated
|
||||
@@ -45,6 +45,6 @@ AppRegistry.registerComponent('PizzaTranslator', () => PizzaTranslator);
|
||||
|
||||
In this example, we store `text` in the state, because it changes over time.
|
||||
|
||||
There are a lot more things you might want to do with a text input. For example, you could validate the text inside while the user types. For more detailed examples, see the [React docs on controlled components](https://facebook.github.io/react/docs/forms.html), or the [reference docs for TextInput](/react-native/docs/textinput.html).
|
||||
There are a lot more things you might want to do with a text input. For example, you could validate the text inside while the user types. For more detailed examples, see the [React docs on controlled components](https://facebook.github.io/react/docs/forms.html), or the [reference docs for TextInput](docs/textinput.html).
|
||||
|
||||
Text input is probably the simplest example of a component whose state naturally changes over time. Next, let's look at another type of component like this one that controls layout, and [learn about the ScrollView](/react-native/docs/using-a-scrollview.html).
|
||||
Text input is probably the simplest example of a component whose state naturally changes over time. Next, let's look at another type of component like this one that controls layout, and [learn about the ScrollView](docs/using-a-scrollview.html).
|
||||
|
||||
Reference in New Issue
Block a user