WebDevSimplified / React-Firebase-Auth

637 stars 439 forks source link

Spread children are not supported in React. #28

Closed Marx-wrld closed 1 year ago

Marx-wrld commented 1 year ago

Compiled with problems:X

ERROR in ./src/components/PrivateRoute.js

Module build failed (from ./node_modules/babel-loader/lib/index.js): SyntaxError: C:\Users\MARX\Desktop\Login-Authentication-with-React-and-Firebase\src\components\PrivateRoute.js: Spread children are not supported in React. 9 | return ( 10 | {/ returning our route/}

11 | { ...rest } {/ This route will take all the rest of the routes/} | ^^^^^^^^^^^ 12 | render={props => { 13 | return currentUser ? <Component {...props} /> : //here we check if we have a current user 14 | //if we have a current user then we just want to render out the component that we got passed into our class.