Skip to content

Commit 3e30040

Browse files
Extends and class are no longer part of the example code 'above'. Add… (facebook#2366)
* Extends and class are no longer part of the example code 'above'. Added the arrow function as an additional example * use fix from the current docs Co-authored-by: Bartosz Kaszubowski <[email protected]>
1 parent 48e2417 commit 3e30040

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

website/versioned_docs/version-0.63/tutorial.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ The following style is [`justifyContent`](layout-props#justifycontent): "center"
4747

4848
Some of the things in here might not look like JavaScript to you. Don't panic. _This is the future_.
4949

50-
First of all, ES2015 (also known as ES6) is a set of improvements to JavaScript that is now part of the official standard, but not yet supported by all browsers, so often it isn't used yet in web development. React Native ships with ES2015 support, so you can use this stuff without worrying about compatibility. `import`, `from`, `class`, and `extends` in the example above are all ES2015 features. If you aren't familiar with ES2015, you can probably pick it up by reading through sample code like this tutorial has. If you want, [this page](https://babeljs.io/learn-es2015/) has a good overview of ES2015 features.
50+
First of all, ES2015 (also known as ES6) is a set of improvements to JavaScript that is now part of the official standard, but not yet supported by all browsers, so often it isn't used yet in web development. React Native ships with ES2015 support, so you can use this stuff without worrying about compatibility. `import`, `export`, `const` and `from` in the example above are all ES2015 features. If you aren't familiar with ES2015, you can probably pick it up by reading through sample code like this tutorial has. If you want, [this page](https://babeljs.io/learn-es2015/) has a good overview of ES2015 features.
5151

5252
The other unusual thing in this code example is `<View><Text>Hello world!</Text></View>`. This is JSX - a syntax for embedding XML within JavaScript. Many frameworks use a specialized templating language which lets you embed code inside markup language. In React, this is reversed. JSX lets you write your markup language inside code. It looks like HTML on the web, except instead of web things like `<div>` or `<span>`, you use React components. In this case, `<Text>` is a [Core Component](intro-react-native-components) that displays some text and `View` is like the `<div>` or `<span>`.
5353

0 commit comments

Comments
 (0)