8 ms·
This is a pattern you cannot always avoid, due to react, but i don't think it should be normalized. Two remarks: • the render function is omitted, this patter
by tuyiown 3y ago
This is a pattern you cannot always avoid, due to react, but i don't think it should be normalized.
Two remarks:
• the render function is omitted, this pattern as a huge impact on application behaviors, if not for display-as-you-load issues, on DOM hidden state (things like focus, animations, etc…) for web apps.
• App's do have a global state, with self-consistency, scattering it in a mixed match of loading cache and self contained components just make it hard to work with. I think it's better to have a centralized upper level parent component that manage the transitional initialization states and consistency, not necessarily for the whole app, but at least for the whole displayed UI content.