Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JS in JSX. Whenever you need to add some JS, just put it inside curly braces {}

const paragraph = 'A paragraph'
ReactDOM.render(
  <div id="test">
    <h1>A title</h1>
    <p>{paragraph}</p>
  </div>,
  document.getElementById('myapp')
)
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #JS #Whenever #add #put #curly #braces
ADD COMMENT
Topic
Name
2+9 =