Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15612

ReactJS Unexpected Token and Adjascent JSX issue

$
0
0
Hi Guys,

First i want to ask if why am I getting an unexpected token ',' error in this code:
Code:

  return (
    <React.Fragment>
      {Object.keys(data).length > 0 && Object.keys(data).map((telemetry, keys) => (
        {
          Object.values(data[telemetry]).map((listItem) => {
            console.log()
          })
        }))
      }
    </React.Fragment >
  )

Secondly, at some point I am getting an Adjacent JSX issue of my codes, mostly in this kind of structure:

Code:

  return (
    <React.Fragment>
    </React.Fragment>
}

At some point I am avoiding some div, for some reason it affects the rendering inside of a grid. I just wanted a pure fragment of <Grid items> that I used for generating elements base on my json data.

Thank you

Viewing all articles
Browse latest Browse all 15612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>