Content deleted Content added
Add React Native to Architecture beyond HTML |
Modernize JSX example with function component instead of Class component |
||
Line 123:
An example of JSX code:
<syntaxhighlight lang="jsx">
function Example() {
// Declare a new state variable, which we'll call "count"
const [count, setCount] = useState(0);
return (▼
<div>▼
<button onClick={() => setCount(count + 1)}>
</div>▼
}▼
}
</syntaxhighlight>
|