aidenybai / million

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

some errors/warnings (mostly hydration) in a remix project #962

Closed halindraprakoso closed 4 months ago

halindraprakoso commented 5 months ago

What version of million are you using?

3.0.3

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

Remix

What package manager are you using?

npm

What operating system are you using?

Mac

What browser are you using?

Chrome

Describe the Bug

I noticed some warnings/errors in the console after upgrading to 3.x in my remix project, though I'm not certain what these might cause as the app was still functioning. It could be reproduced using a fresh remix project (with vite)

image

then adding a script like so:

<script
          dangerouslySetInnerHTML={{
            __html: `window.ENV = ${JSON.stringify({ env1: "test"})}`,
          }}
 />

completely break the site (probably not so important because I could create a component of it and // million-ignore it)

image

What's the expected result?

no warnings/errors

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-ciwjgo?file=vite.config.ts

Participation

github-actions[bot] commented 5 months ago

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

tobySolutions commented 5 months ago

Thanks for reporting @halindraprakoso, but, I wasn't able to reproduce this on my end; this is what I got:

https://stackblitz.com/edit/github-ciwjgo-klwsv5?file=vite.config.ts

Screenshot 2024-02-12 at 11 36 15
halindraprakoso commented 5 months ago

Hi @tobySolutions were there any hydration error in the console? it actually caused bugs in my app that I had to revert back to 2.6.4.

unfortunately I'm still getting the same errors even from your stackblitz

image
tobySolutions commented 5 months ago

Hi @tobySolutions were there any hydration error in the console? it actually caused bugs in my app that I had to revert back to 2.6.4.

unfortunately I'm still getting the same errors even from your stackblitz image

Actually you're right, I'm getting it here too. Thanks for sharing this, I appreciate it.

Screenshot 2024-02-12 at 11 49 36
tobySolutions commented 5 months ago

I have shared with one of our engineers. Thanks!

Aslemammad commented 5 months ago

I'll fix this soon!

tobySolutions commented 5 months ago

Thanks @Aslemammad