aidenybai / million

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

[million] updating from 3.0.3 to 3.0.4 causes an error in gatsby.js dev #982

Closed JustFly1984 closed 2 months ago

JustFly1984 commented 4 months ago

What version of million are you using?

3.0.4

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

yarn

What operating system are you using?

Mac

What browser are you using?

Chrome

Describe the Bug

After updating million@3.0.3 to 3.0.4 getting new error/warning:

Warning: useLayoutEffect does nothing on the server, because its effect cannot be encoded into the
server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and
 the intended UI. To avoid this, useLayoutEffect should only be used in components that render
exclusively on the client. See https://reactjs.org/link/uselayouteffect-ssr for common fixes.
    at /Users/user/projects/gatsby-frontend/.cache/page-ssr/routes/render-page.js:60084:16
    at Html
(/Users/user/projects/gatsby-frontend/.cache/page-ssr/routes/render-page.js:8656:3)

reverting it back to 3.0.3 resolves an error

What's the expected result?

No error, not using browser only APIs for SSR.

Link to Minimal Reproducible Example

sorry

Participation

github-actions[bot] commented 4 months ago

Thanks for opening this issue! A maintainer will review it soon.

tobySolutions commented 4 months ago

Thank you for sharing this @JustFly1984, we're looking into it. Check this out @Aslemammad

github-actions[bot] commented 3 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.

JustFly1984 commented 3 months ago

not stale

github-actions[bot] commented 3 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.