Giter VIP home page Giter VIP logo

Comments (14)

drewbitt avatar drewbitt commented on May 27, 2024 2

Actually though, I see that in my code and the reproduction, before I was getting notice of each component and how much Million speeds things up. Changing it to that config however which makes this not break disables that printout, so I'm not sure Million is working at all.

Before:
image

After:
image

from million.

tobySolutions avatar tobySolutions commented on May 27, 2024 1

Hey there @drewbitt, can you maybe try this config?

import million from 'million/compiler'

/** @type {import('next').NextConfig} */
const nextConfig = {
	reactStrictMode: true,
}

export default million.next(nextConfig, {
	auto: true,
	server: true,
	rsc: true,
})

from million.

github-actions avatar github-actions commented on May 27, 2024

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

from million.

tobySolutions avatar tobySolutions commented on May 27, 2024

Hmm, can you come into the server to report this @drewbitt? Maybe we can get on a call? We would need a reproduction before we're able to help.

https://million.dev/chat

from million.

madebyfabian avatar madebyfabian commented on May 27, 2024

Having the same issue with Next.js 14.1.4 and pages router:

Error: Hydration failed because the initial UI does not match what was rendered on the server.

Warning: Did not expect server HTML to contain a <section> in <slot>.

See more info here: https://nextjs.org/docs/messages/react-hydration-error

Component Stack
slot
MillionBlock
eval
SectionLayoutContent
SectionPopularCompares
div
SectionHero
main
Layout
Page
LazyMotion
MotionConfig
PlausibleProvider
App

I get the same error with <footer> or <tr> elements. Changing these elements into a <div> removes most of the errors. But this cannot be a solution, especially with <tr> 😄

from million.

tobySolutions avatar tobySolutions commented on May 27, 2024

Hmm, thank you very much for these. Really appreciate it. Can you please help with a reproduction though? I use Million in Nextjs pages router app and I don't get this issue at all.

Hey @drewbitt, why are you using this specific configuration?

const millionConfig = {
  auto: {
    rsc: true,
  },
};

Please refer to the documentation here: https://million.dev/docs/install#install-manually

from million.

madebyfabian avatar madebyfabian commented on May 27, 2024

@tobySolutions Sorry! Of course, here is a reproduction. It has a slightly different error message, but it's the same issue. It's a blank next.js project (pages router), where I just added a <table> and <section> component
https://stackblitz.com/github/madebyfabian/nextjs-million-reprod?file=pages%2Findex.tsx

from million.

tobySolutions avatar tobySolutions commented on May 27, 2024

@tobySolutions Sorry! Of course, here is a reproduction. It has a slightly different error message, but it's the same issue. It's a blank next.js project (pages router), where I just added a <table> and <section> component https://stackblitz.com/github/madebyfabian/nextjs-million-reprod?file=pages%2Findex.tsx

Awesome! Thank you very much, I really appreciate it.

from million.

drewbitt avatar drewbitt commented on May 27, 2024

I appreciate the reproduction @madebyfabian and the config @tobySolutions. The config update does fix this for me and I do not have the hydration error. I assume the docs should be updated as I was not seeing this as the recommended config for Nextjs.

from million.

fristyr avatar fristyr commented on May 27, 2024

drewbitt

Having the same issue

from million.

github-actions avatar github-actions commented on May 27, 2024

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.

from million.

drewbitt avatar drewbitt commented on May 27, 2024

Not stale. That's aggressive.

from million.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.