react-redux
react-redux copied to clipboard
Docs: Document "alternate renderers" entry point
In v7, we added a hard dependency on either react-dom
or react-native
, because we need to pull in unstable_batchedUpdates
. For those users who happen to not be using RD or RN, we added an "alternate renderers" entry point that drops the batching.
This entry point was described in the v7 release notes at https://github.com/reduxjs/react-redux/releases/tag/v7.0.1 , but we do not have it formally documented. We should add some kind of a usage guide page for using RR with other renderers.
This came up in #1457 .
Good to see this is already supported! I'll be using this for the Netflix TV app, which uses an alternate renderer that works with our smart TV platform.
In alternate-renderers
, I see:
// For other renderers besides ReactDOM and React Native, use the default noop batch function
const batch = getBatch()
I'd actually like the ability to pass in my own batch
function. Would you accept a PR for that?
Hmm. Can we do that by exporting whatever internal setBatch
function we already have?
That's what I was planning to do. 😄