I haven't seen any libraries using the new context API make use of the observedBits prop (currently called `unstable_observedBits`, as its not officially supported). There's a comment in this library's codebase that hints that it will be used in the future. I wrote a bit about this API bitmask-based API a few months ago while I was experimenting with it[1], so I'm curious about its current state and whether others have experimented with it or know about its future in general.[1] https://hph.is/coding/bitmasks-react-context
acemarke|7 years ago
https://github.com/reduxjs/react-redux/issues/1018
I actually referenced your blog post as a good overview of how to use the bitmask API, so thanks for writing it!
I also filed a React RFC to make the API a bit more flexible by allowing us to pass a `calculateChangedBits` function directly to a `Context.Provider` instance:
https://github.com/reactjs/rfcs/pull/60
Sebastian Markbage replied in that RFC thread, and tbh the discussion seemed a bit odd. It seemed like he was discouraging me from trying to use the bitmask API, or trying to figure out why I might actually want to use it, when it seems like the entire reason it exists is exactly for something like React-Redux to leverage it for performance optimizations.
Aweary|7 years ago