A
A
Artur Kudashev2019-03-04 21:43:44
JavaScript
Artur Kudashev, 2019-03-04 21:43:44

How to rename a file in React?

Hello, I had an index.js file, I renamed it to app.js, but React is looking for index.js. How do I update the project so that React starts looking for the right file?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Robur, 2019-03-04
@Robur

find where "index.js" occurs in your project files and replace it with "app.js". at some point you will be lucky and it will work.
In general, of course, it would be nice to understand how your build system is arranged and works, and until then, do not rename anything so that it does not break.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question