Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

usestate

function ExampleWithManyStates() {
  const [age, setAge] = useState(42);
  const [fruit, setFruit] = useState('banana');
  const [todos, setTodos] = useState([{ text: 'Learn Hooks' }]);
Source by reactjs.org #
 
PREVIOUS NEXT
Tagged: #usestate
ADD COMMENT
Topic
Name
6+8 =