arunoda / react-komposer

Feed data into React components by composing containers.
MIT License
732 stars 70 forks source link

Merged containers' loading behavior #161

Open Floriferous opened 7 years ago

Floriferous commented 7 years ago

When merging multiple composers, I'd expect the loading component to start appearing when going through the first composer, and end when all the data has arrived, is this how it is handled? Also, would the component, if provided, animate continuously ?

To illustrate, what is the difference, if any, between these 3 approaches:

export default merge(
    compose(dataLoader1),
    compose(dataLoader2),
    compose(dataLoader3, optionsWithLoadingComponent),
)(UIComponent);
export default merge(
    compose(dataLoader1, optionsWithLoadingComponent),
    compose(dataLoader2),
    compose(dataLoader3),
)(UIComponent);
export default merge(
    compose(dataLoader1, optionsWithLoadingComponent),
    compose(dataLoader2, optionsWithLoadingComponent),
    compose(dataLoader3, optionsWithLoadingComponent),
)(UIComponent);