reaviz / reagraph

🕸 WebGL Graph Visualizations for React. Maintained by @goodcodeus.
https://reagraph.dev
Apache License 2.0
634 stars 58 forks source link

Conflict with react-bootstrap #149

Open borisalekseev opened 8 months ago

borisalekseev commented 8 months ago

Describe the bug

When using both reagraph and react-bootstrap library together there is absolutely random problem with Button element from react-bootstrap. I couldn't find any regularity but some buttons work normally, in other error is raising: TS2590: Expression produces a union type that is too complex to represent. Espetially unexpected is that error raises at random time in other react-bootstrap elements, i suppose this is due to the large number of iterations when calculating types, but i have no cnfidence about it and have no idea why its happen.

Steps to Reproduce the Bug or Issue

In element like this error is raising: ` import React from "react"

const El:React.FC = () => (

{/* i haven't even import from reagraph in this module */} {/* @ts-ignore-next-line only this 'hack' helps now*/}

) `

Expected behavior

Expected behavior is no error.

Screenshots or Videos

No response

Platform

Your Example Website or App

No response

Additional context

here is tsconfig.json { "compilerOptions": { "target": "es5", "lib": [ "dom", "dom.iterable", "esnext" ], "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "react-jsx" }, "include": [ "src" ] }

amcdnl commented 8 months ago

Can you provide an example via Github repo or Codesandbox?

borisalekseev commented 8 months ago

@amcdnl here is the example, screenshot also in src folder https://github.com/borisalekseev/reagraph-bug-example

amcdnl commented 6 months ago

So if you import this line - https://github.com/borisalekseev/reagraph-bug-example/blob/master/src/App.tsx#L5 - it crashes but if its not there it doesnt?

borisalekseev commented 6 months ago

@amcdnl yes, exactly.

screenshots

![image](https://github.com/reaviz/reagraph/assets/103372063/8f2ef41e-d226-4e33-9ad9-2713928e7cb3) ![image](https://github.com/reaviz/reagraph/assets/103372063/935057d8-2b88-4ee8-8e1b-3bb40f66588f)

amcdnl commented 5 months ago

Can you retry now? We changed some things internally that might have been causing the conflict.

jantoebes commented 5 months ago

i've got the same issue now with version 4.15.19

image
thenlvnp commented 2 days ago

could this be related to this issue https://github.com/pmndrs/react-three-fiber/discussions/1752# ? I noticed that this library relies on @react-three/fiber