4 ms·
See the section in the article with the heading "Dependency Injection". It talks about a specific scenario where there is one component that needs to show the s
by mistermumble 9y ago
See the section in the article with the heading "Dependency Injection". It talks about a specific scenario where there is one component that needs to show the state of the entire system (an activity light turned on, for example), where any component can trigger this, but the last component to become inactive turns the light off.
- 8note 9y agoisn't that Facebook's example for why they made react? the light is the number of notifications/chat messages you have available,and they could never get it to stay consistent?
- acemarke 9y agoThat was related to the "Flux architecture", I believe - having a "single source of truth" for the data.
- netzone 9y agoCouldn't you just extend the React.Component class with whatever you need, and then use that instead of the base react class? Or am I misunderstanding what react is?