P
P
poniatowski2019-04-24 14:03:58
React
poniatowski, 2019-04-24 14:03:58

Importing a component in React. Why does not it work?

Hello. Started learning React recently, in the process the following question appeared.
I'm building with create react app, then I want to split all the code into components. That's just the problem. When using import and export everything breaks. Could there be a reason in babel? How can I check what's wrong and fix the situation?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Okhotnikov, 2019-04-24
@poniatowski

So you don't import it anywhere, write
import {Footer} from './footer/footer.js'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question