SyntaxError:Unexpected token, expected ","

Error it self

How it looks in VScode

Thats Toollsit component

import React, { Component } from 'react';
 import Toolitem from './Toolitem'
 import App from '../App';
  const styles = {

  export default  function Toollsit(toto,title){
   {>{return (<Toolitem toto={toto} />)})} 

Thats Toolitem component
import React from ‘react’;

      const Toolitem = ({toto}) => {
         return (

            export default Toolitem;

And thats my App.js

       import react from 'react';
       import Toollsit from './components/Toollsit'
         function App(props) {
           const toto =[
             return (
                <span className="wrapper">
                 <Toollsit toto={toto} />

          export default App;

Thank you for any help,critic I truly appreciate your feedback

>Solution :

You must place the map function in <React.Fragment> tag (equivalent: <>). Additionally, the arguments should be destructed object.

  export default  function Toollsit({toto, title}){
   {>{return (<Toolitem toto={toto} />)})} 

Leave a Reply