You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is no reason dockview should not support components wrapped in React.memo. I will get this changed, the current check is very old, not particularly clever and simply checks if the input is typeof function.
The reason dockview is explictly checking is that if we don't React will throw very obsure errors if a user does pass in something that is not a React component by mistake.
Describe the bug.
Hi there!
I have several functional components in the Dockview "components" prop which are wrapped in React.memo for performance.
const ExampleComponent = memo(function ExampleComponent() { return <>Example JSX</>; });
This throws the following error in the JS console, coming from dockview
I was hoping to get support for these components, or maybe you can elaborate on why these are deliberately not supported if that's the case.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Not error
The text was updated successfully, but these errors were encountered: