Closed mikecann closed 1 year ago
Can you share your code that causes this error? I have, for example, a Box
export, but I am happy to remove it as it's unneeded and maybe even confusing, but perhaps you have something else - looks like may be a globals conflict...
Hmm I just had a shot at trying to make it fail but I failed:
https://codesandbox.io/s/eloquent-tesla-rnvk8g?file=/src/App.tsx
It seems to work fine.. I guess the issue is my end then, some combination of my dependencies + builder... sigh
Sometimes codesandbox is more forgiving than VS Code. Can still be an issue here.
As the title suggests you get typescript errors when you try to combine react-babylonjs with Chakra-UI.
I suspect that this is a common issue with React Fibre when combined with complex UI frameworks. See these other issues from similar libs:
https://github.com/pmndrs/react-three-fiber/discussions/1752 https://github.com/pmndrs/react-spring/issues/1515 https://github.com/microsoft/TypeScript/issues/34933 https://stackoverflow.com/questions/69625898/typescript-box-produces-a-union-type-that-is-too-complex-to-represent
I honestly dont know what you can do about it. Its really annoying as I was looking forward to using ract-babylon but there is no way we can refactor out chakra at this stage.
If this is not fixable feel free to close.