Nikita Shchypylov2018-01-23 13:46:31
Nikita Shchypylov, 2018-01-23 13:46:31

A couple of questions about the organization of the React file structure?

1) Where to upload files like pictures and .json'ov? I have the usual structure like


For example, if I throw json into src, then I can’t reach them using axios, or if I throw an image into the src_img folder, then css gives me 404
The only way out is to put everything in public. Is this the right approach?
2) Styles in React. For each component, I create a separate file and import
it into the component. I store them in /src/css. Is it right?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Roman Aleksandrovich, 2018-01-23

1) I store pictures in the /public/img folder
2) I do the same

Ivan GiBSON, 2018-01-23

1 if it should be available - then in /public
2 I store css/scss near the component itself

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question