react-redux icon indicating copy to clipboard operation
react-redux copied to clipboard

Docs: Document "alternate renderers" entry point

Open markerikson opened this issue 5 years ago • 4 comments

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 .

markerikson avatar Nov 11 '19 20:11 markerikson

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.

NickHeiner avatar Apr 09 '20 22:04 NickHeiner

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?

NickHeiner avatar Apr 09 '20 22:04 NickHeiner

Hmm. Can we do that by exporting whatever internal setBatch function we already have?

markerikson avatar Apr 10 '20 00:04 markerikson

That's what I was planning to do. 😄

NickHeiner avatar Apr 10 '20 02:04 NickHeiner