-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[charts][core] Replace useIsomorphicLayoutEffect of @react-spring/web for Base UI's helper #13431
Comments
@oliviertassinari could you confirm the const useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect; vs var isSSR = () => typeof window === "undefined" || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent);
var useIsomorphicLayoutEffect = isSSR() ? useEffect : useLayoutEffect; |
is this still a valid issue then? 🤔 |
Probably a question to @mui/xcharts. 🤔 |
I haven't seen any issues regarding the current implementation, but indeed it seems that Deno has |
@LukasTy I was thinking of
It feels like useEnhancedEffect is better because it's less bundle size, and I'm not aware of people complaining about its behavior.
It's part of why I opened this issue, the value I see:
|
Steps to reproduce
mui-x/packages/x-charts/src/hooks/useReducedMotion.ts
Line 1 in ba8d2f2
looks suboptimal to me.
useIsomorphicLayoutEffect
should be using Base UI helper instead.The text was updated successfully, but these errors were encountered: