Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to declare a variable in react

// Declare a variable:
const name = 'Gerdo';
 
// Access your variable 
// from inside of a JSX expression:
const greeting = <p>Hello, {name}!</p>;
 
PREVIOUS NEXT
Tagged: #declare #variable #react
ADD COMMENT
Topic
Name
2+4 =