0

I'm a beginner learning through a tutorial and I get the error:

'Unexpected token, expected ","'

for the export line no matter what I do. I would appreciate any advice.

import React from "react";

const Movie = () => <div 
className="movie">  This is movie 
component </div>;
  
export default Movie;

1 Answer 1

1

Please try putting the component in brackets like this:

import React from "react";

const Movie = () => (<div 
className="movie">  This is movie 
component </div>);
  
export default Movie;
Sign up to request clarification or add additional context in comments.

1 Comment

I had to restart vscode but it worked. Thank you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.