0
votes

I am trying to import 2 components from the components folder. Both components' class are export default .

However, I got an error message that I should use the curly braces in my import statement. However, both components above are not using named export so curly braces is not needed when importing them.

How can I make this work?

Main app

Login component

2

2 Answers

0
votes

You can create a index.js file in the components folder that imports and exports all the components, then you will be able to import the components at the same line.
This question and answer might help you

0
votes

Try importing them individually:

import Login from "./components/Login"
import Question from "./components/Question"