Skip to content
New issue

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

Conflict with react-bootstrap #149

Open
borisalekseev opened this issue Dec 7, 2023 · 6 comments
Open

Conflict with react-bootstrap #149

borisalekseev opened this issue Dec 7, 2023 · 6 comments

Comments

@borisalekseev
Copy link

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*/}
<Button onClick={() => myFunc({name: "", type: ""})}>Add

)
`

Expected behavior

Expected behavior is no error.

Screenshots or Videos

No response

Platform

  • Reagraph Version: 4.14.2
  • OS: ubuntu 22.04
  • NodeJS version: 20.7.0
  • react-bootstrap version 2.9.1

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
Copy link
Member

amcdnl commented Dec 7, 2023

Can you provide an example via Github repo or Codesandbox?

@borisalekseev
Copy link
Author

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

@amcdnl
Copy link
Member

amcdnl commented Feb 19, 2024

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
Copy link
Author

@amcdnl yes, exactly.

screenshots

image
image

@amcdnl
Copy link
Member

amcdnl commented Mar 4, 2024

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

@jantoebes
Copy link

i've got the same issue now with version 4.15.19

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants