React

import React from 'react' function changeuser() { let user ='Aditya'; console.log(user); function changename(){ user ="Aditya badiger"; console.log(user); } return (

The username is {user}

) } export default changeuser this code is not working because we store variables in a new way in react import React, { useState } from 'react' function App() { const [a, setA] = useState(1) return (

hello the number is {a}

) } export default App this code refers to creating variables

Comments

Popular posts from this blog

Apology

Jarvis my first python project