antv/x6-react-shape 使用react组件 使用useContext 永远是默认值 如何使用状态管理 #1844
Unanswered
meikang123
asked this question in
Q&A
Replies: 1 comment
-
|
因为 react 节点不处于正常的 reactdom 树中,所以状态是默认的,可以使用这种方式解决:https://github.com/antvis/X6/blob/master/examples/x6-example-features/src/pages/react/portal.tsx |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
antv/x6-react-shape 使用react组件 使用useContext 永远是默认值 如何使用状态管理
Beta Was this translation helpful? Give feedback.
All reactions