aidenybai / million

Optimize React performance and make your React 70% faster in minutes, not months.
https://million.dev
MIT License
16.09k stars 561 forks source link

Problems with <slot> tag in threejs. #531

Closed aboueidlautaro closed 8 months ago

aboueidlautaro commented 11 months ago

Hello, nice to meet you. I am working with the R3F library to use threejs in React, when using million my component crashes because the <slot> tag is not included within the THREE namespaces, so in the <Canvas> component that renders my 3D object it happens an error because it does not find that <slot> tag within its declarations. The problem is that I can't expand THREE namespaces with slot because I don't know what that extension should include.

Could you help me? Thank you!

Error explained:

Error: R3F: Slot is not part of the THREE namespace! Did you forget to extend? The above error occurred in the <ForwardRef(Canvas)> component: The above error occurred in the <slot> component:

tobySolutions commented 11 months ago

Hmm, thank you for this @aboueidlautaro. We'll have the team review it so we can get a move on to get it looked at.

verekia commented 11 months ago

React Three Fiber users are probably going to be quite interested in Million.js performance improvements in general. I think it would be worth mentioning in the FAQ if Million.js works with R3F or if there are plans to support it.

aboueidlautaro commented 11 months ago

I honestly just wish I could remove R3F from Millionjs optimization in “auto: true” mode.

rishi-raj-jain commented 10 months ago

Blocking because of #567

Drex72 commented 9 months ago

I honestly just wish I could remove R3F from Millionjs optimization in “auto: true” mode.

@aidenybai , do you think there's a way that we can set it up in the auto mode that you can exclude certain components from being optimized by million

Drex72 commented 9 months ago

I honestly just wish I could remove R3F from Millionjs optimization in “auto: true” mode.

I dont think the million auto mode optimizes libraries there's an existing issue with slots, which is curerntly underway, once it is resolved, i believe it should also resolve your issue just join the discord so you'd know we make an update

github-actions[bot] commented 9 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days.

github-actions[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days.