D
D
Dyadko_Orest2020-05-01 19:04:39
React
Dyadko_Orest, 2020-05-01 19:04:39

React&Redux structure?

Hello, I'm learning React&Redux, I have some test projects, but I don't have real practice with it. I have a question about the project structure. Can someone suggest some useful articles or something like that. Several companies looked at my projects, some said that I had too separate components, others said that I needed to separate them more. Where is the truth is unclear. I read a lot of information, but everywhere it is different, I want to ask those who work with react where to read up-to-date information on this matter.
Now I try to separate the components as much as possible.
For example, I have a page that has a heading, some text, a list, a button, then I make separate components for each element (for ul and li are also separate). Is it necessary to do this or should there be less separation?
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
y0u, 2020-05-01
@y0u

I read a lot of information but everywhere it is different

That's right. Each project has its own structure. You need to use the one that is most suitable for specific tasks and goals.
Everything you read is valid. Take what you think is best from each approach and apply it to your projects.
I make separate components for each element (for ul and li are also separate)

This is not to say that this is not correct, but in most average projects it can be too redundant. Think about why you need a separate LI component and how you will use it. Perhaps you don't need to move this element into a separate component.

M
Mikhail Osher, 2020-05-01
@miraage

https://redux-toolkit.js.org/ study up and down. There are many examples there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question