A
A
alexfrolov_xcx2017-10-21 15:10:56
React
alexfrolov_xcx, 2017-10-21 15:10:56

Syntax error in React export default?

Hi all! I’m just starting to understand React, and I don’t quite understand this error:
59eb38f4033d1257376014.png
It occurs when I register export default for two components, but when I delete one of them, this error doesn’t exist ... it would seem that the problem has been resolved, but I would like to understand why?
59eb394a17057976627984.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2017-10-21
@alexfrolov_xcx

Here is a good explanation as to why.
Well, in short - if export default occurs more than once, then during import it will not be clear what exactly needs to be imported.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question