We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ref
ref is not generic. This causes a mismatch between ref={setSigma} and the actual type of setSigma.
ref={setSigma}
setSigma
We give it setSigma: React.Dispatch<React.SetStateAction<Sigma<MyGraph> | null>>
React.Dispatch<React.SetStateAction<Sigma<MyGraph> | null>>
but the ref enforces setSigma: React.Dispatch<React.SetStateAction<Sigma<AbstractGraph<Attributes, Attributes, Attributes>> | null>>
React.Dispatch<React.SetStateAction<Sigma<AbstractGraph<Attributes, Attributes, Attributes>> | null>>
React-sigma-v2: 3.4.2 Sigma.js version: 2.4.0 Graphology version: 0.25.4 Operating System: LG Laundry machine OS Web browser: Edge 120.0.0
Check the live example https://codesandbox.io/p/sandbox/react-sigma-example-forked-9mks58?file=%2Fsrc/App.tsx
I can use setSigma with custom graph type so I can get better intellisense
Computer says no:
If the issue has an inactivity of 30 days, it becomes stale. With an additional inactivity of 14 days, the issue is closed
The text was updated successfully, but these errors were encountered:
Done with the latest version of sigma (ie. the v3). Take a look here : https://github.com/sim51/react-sigma/blob/main/packages/storybook/stories/External.tsx#L13
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
ref
is not genericref
is not generic. This causes a mismatch betweenref={setSigma}
and the actual type ofsetSigma
.We give it
setSigma
:React.Dispatch<React.SetStateAction<Sigma<MyGraph> | null>>
but the
ref
enforcessetSigma
:React.Dispatch<React.SetStateAction<Sigma<AbstractGraph<Attributes, Attributes, Attributes>> | null>>
React-sigma-v2: 3.4.2
Sigma.js version: 2.4.0
Graphology version: 0.25.4
Operating System: LG Laundry machine OS
Web browser: Edge 120.0.0
Steps to reproduce
Check the live example https://codesandbox.io/p/sandbox/react-sigma-example-forked-9mks58?file=%2Fsrc/App.tsx
Expected behavior
I can use
setSigma
with custom graph type so I can get better intellisenseActual behavior
Computer says no:
Note
If the issue has an inactivity of 30 days, it becomes stale.
With an additional inactivity of 14 days, the issue is closed
The text was updated successfully, but these errors were encountered: