MichalZalecki / react-portal-universal

Generic wrapper for React's createPortal allowing for rendering portals on the server
ISC License
67 stars 13 forks source link

Could not find "store" in either the context or props #2

Open martinchristov opened 6 years ago

martinchristov commented 6 years ago

Hi there, I'm running into issues because of my portals using connected redux props. I need to somehow wrap the rendering of the portals with:

<Provider store={store}><ConnectedIntlProvider>{renderUniversalPortals()}

Perhaps introducing a second parameter to the appendUniversalPortals function like this:

const PortalWrapper = ({children}) => <Provider store={store}><ConnectedIntlProvider>{children}</ConnectedIntlProvider></Provider> appendUniversalPortals(html, PortalWrapper)

what are your thoughts ?