score:2
Accepted answer
the only way to add comments in jsx is to use {/* ... */}
syntax, for example:
...
<div>
{/* a jsx comment */}
</div>
...
the html comments <!-- ... -->
do not work, plain js comments //
and /* ... */
do not work too.
Source: stackoverflow.com
Related Query
- How to comment in react that will be compiled by webpack
- { React jsx babel es6 webpack } How Can I Comment in render ( return ( // || /**/ ) )?
- How to use babel with npm package that will be used by react
- How to make a webpack library that can be consumed in React Application?
- In React with Formik how can I build a search bar that will detect input value to render the buttons?
- How to detach mock function from the react component's prototype so that will not affect other test?
- React - how to add boolean field on props when using map(), given that the field will be changing
- How to set the height knowing that under input will helper text appear in React MaterialUI v3.7?
- React and progress bar. How can I add progress bar that will work with my input and my data
- pop-up notification in react after login, How to make it so that it will on show the message one time when you first logged in?
- How do I create a loader that will load in between images when they load in an image slider in react js
- React handleSubmit form - how to ensure that methods within the handlesubmit method will only be executed when a condition is satisfied
- How can I edit the useEffect hook in react so that whenever there is a new row in mySQL or database, the table generated will auto refresh?
- How to return column that will be sorted by number within component in React Table?
- How do I create a custom webpack loader that still compiles my react code properly?
- How to test a react component that is dependent on useContext hook?
- How to import CSS modules with Typescript, React and Webpack
- How do I use external script that I add to react JS?
- How do I wrap a React component that returns multiple table rows and avoid the "<tr> cannot appear as a child of <div>" error?
- How to avoid React loading twice with Webpack when developing
- How to set up Babel 6 stage 0 with React and Webpack
- How do react hooks determine the component that they are for?
- How to configure webpack dev server with react router dom v4?
- How can I speed up a React render() method that generates a huge DOM?
- how to setup bootstrap 4 scss with react webpack
- How does webpack handle multiple files importing the same module React
- How to update webpack config for a react project created using create-react-app?
- How to unit test a react event handler that contains history.push using Jest and Enzyme?
- How to integrate azure ad into a react web app that consumes a REST API in azure too
- React router v4 - How do you access the state that is passed via Redirect?
More Query from same tag
- Redux Form Validation firing on load (UPDATE_SYNC_ERRORS)
- Dynamically import React component from external URL and use parent React environment
- How to vertically center multiple rows in an AppBar in Material-UI
- Semantic UI React: Align 2 columns in middle and 1 to the top
- react admin returns Unauthorized 401 error upon CRUD operations
- Metamask injects web3 after page refresh only
- One route works and one doesn't
- How can I pass random prop from api to another component?
- React best way to handle empty object before mount?
- React app injecting into js instead of index.html
- Javascript React Switch Case with dynamic keys?
- How to display working digital clock using React
- Reagent does not register atom watch
- How to pass down state and handlers in nested React components
- React component is not accepting JSX Element as prop
- NextJS official sample code: _app.getInitialProps calls Component.getInitialProps -- is this to make sure all pages load data?
- How do I get cell number and sheet name of excel by office.js Office.initialize?
- Action is not called after being canceled redux-saga
- Environmental variables only accessible during development, how to make this work after deploying website? (GatsbyJS project)
- componentWillUnmount is not getting invoked
- Cannot read property https of undefined error in firebase functions
- How to setup a react state to use a list of a custom type
- How to change the thumb icon of the material-ui slider
- render html elements to react as valid react form element that can be submitted
- Error On Express Router Setup: Router.use() requires middleware function but got a undefined
- Mock componentDidMount lifecycle method for testing
- Setting up React in a CakePHP project
- OnClick passing undefined
- How do I loop and iterate a row in React application
- multiply 'connect' with react-redux