Sandro Miguel Marques
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
content/blog/2020-09-22-introducing-the-new-jsx-transform.md
|
|
@ -241,7 +241,7 @@ For example, |
|
|
|
import React from 'react'; |
|
|
|
|
|
|
|
function App() { |
|
|
|
const [text, useText] = React.useState('Hello World'); |
|
|
|
const [text, setText] = React.useState('Hello World'); |
|
|
|
return <h1>{text}</h1>; |
|
|
|
} |
|
|
|
``` |
|
|
@ -252,7 +252,7 @@ will be replaced with |
|
|
|
import { useState } from 'react'; |
|
|
|
|
|
|
|
function App() { |
|
|
|
const [text, useText] = useState('Hello World'); |
|
|
|
const [text, setText] = useState('Hello World'); |
|
|
|
return <h1>{text}</h1>; |
|
|
|
} |
|
|
|
``` |
|
|
|