React context is not available inside onRenderTab when dragging the tab after updating to 0.6.0
See original GitHub issueI use React’s context and more specifically useSelector
from react-redux
in a component which I set in renderValues.content
of the onRenderTab
. When I drag the tab, I get the following error: Uncaught Error: could not find react-redux context value; please ensure the component is wrapped in a <Provider>
.
I get this error only in 0.6.0 version.
You can see the problem in the CodeSandbox below.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
React context not updating - Stack Overflow
In this case your AppWrapper where you render the context provider is where you need to track state. import React, {useContext, useState, ...
Read more >FlexLayout/ChangeLog.txt at master - GitHub
Use portal for drag rectangle to preserve React context in onRenderTab. 0.6.0. Changed icons to use svg images, these will now scale with...
Read more >uncaught error: could not find react-redux context value
caplin/FlexLayoutReact context is not available inside onRenderTab when dragging the tab after updating to 0.6.0#285. Created 12 months ago.
Read more >Context - React
Context provides a way to pass data through the component tree without having to pass props down manually at every level. In a...
Read more >storybook-react-context - npm
Manipulate React context inside Storybook. Read state and dispatch updates from outside of React component.. Latest version: 0.6.0, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve published v0.6.1 with the change
I’ve just pushed a change that uses React portals rather than ReactDOM.render, this should keep the context in the onRenderTab callback.
Can you try the latest code and see if that fixes your problem.