How to organize React + MobX project structure (stores, components, components' states, etc)

Viewed 555

I am starting a project from the scratch (with React + MobX) and since MobX is not really opiniated about structure I really have some troubles in defining it and couldn't find any really full examples.

I have read a lot of materials + full MobX docs (including best practises regarding stores) but still some stuff is not clear.

My questions are the following:

  1. Organizing stores and connection between them (Root Store vs DI or any other approach)
  2. Handling of complex component's state - separate state file? container component with logic + dumb component? one huge component which renders content and holds all the logic (actions, computed values...)? Who is responsible for instantiating such states if they are in a separate file?

So in general I would really love to just get some examples of React + MobX project's structures with describing pros and cons of using and maintaining that structure.

0 Answers
Related