Aug 24, 2017 · 1 min read
Thx Israel, it is so true that there is risk using context.
Hum, as the research I did, using context may or may not influence the scope functions, such as componentDidMount, componentWillMount, componentShouldUpdata etc. That is why it is not suitable to use context to handle dynamic data which passed to child components back and forward.
My use-case is using context to manage css(theme) style, which is only given once during the time that the web is opened, and it is never change.
