How to pass data to the component tree React / Vue application?

The application describes a layered structure, several levels of the tree of komponentov. The data is stored-loaded into a similar tree.

And stored and known by initialisatie applications only the object id and data for display asynchronously queried from a third-party API. Ie, when you open some object only visible to the first id of the child, and a half-seconds loaded avatars-names.

I see two options for transferring data inside:
  1. top-down using props to convey a complete data store-upgrade them at the top
  2. or to pass down your id, and each of the lower components, he will ask-you will get full data.
Question 1. How best to proceed with data transmission to display: all props using top-down or independence of sub-components, each itself zaprashivat-receives-displays additional data?

The tree is edited in the process. On some of the levels you are adding the item. You can pass "up" user input, and there is a single component will update the appropriate node in the data tree; or in the leaf-component to handle input, query API, update handed over to props a piece of shared data?
Question 2. What to do when upgrading: to transmit "up" or again, alone in coponent stew? (question 2 is not very different from question 1 : )
June 5th 19 at 10:09
1 answer
June 5th 19 at 10:11
It is better to ask in one place at the top and pass down. Monitoring of implementation will be apparent that with the growth of applications on Vuex the transition will be painless.
Vuex somehow helps with the tree component? Write only about a single store (I never have, but are added dynamically loadable data); synchronous mutations, asynchronous actions. Nothing more. - Lorena commented on June 5th 19 at 10:14
no, this does not help, except one: when you need to update any data displayed in different components, which are not related to each other hierarchically. - jado commented on June 5th 19 at 10:17

Find more questions by tags ReactVue.jsDesigning software