Giter Club home page Giter Club logo

Comments (7)

sozonome avatar sozonome commented on August 25, 2024

can you include the repo? It's hard to identify the problem just from the file you included here, it can be from outside _document.js.

Make sure to:

  1. Remove tsconfig.json or rename tsconfig.json to jsconfig.json
  2. If you use jsconfig.json and use absolute import, make sure it's configured properly
  3. Any underlying components, utilities, etc are converted to js

But if I may ask, why do you transform it to normal js?

from nextarter-chakra.

sozonome avatar sozonome commented on August 25, 2024

Anyways, I was able to transform this template to js with slight modifications, you can see what I do at this branch:
https://github.com/sozonome/nextarter-chakra/tree/transform/js

changes: 035ce54

Hope this helps

from nextarter-chakra.

PrimozRome avatar PrimozRome commented on August 25, 2024

Thanks a lot. It's late over here so I will work on this tomorrow. Much appreciated !

from nextarter-chakra.

sozonome avatar sozonome commented on August 25, 2024

Thanks a lot. It's late over here so I will work on this tomorrow. Much appreciated !

No worries, happy to help 🙏 . Let me know if its resolved and I will close this issue.

from nextarter-chakra.

PrimozRome avatar PrimozRome commented on August 25, 2024

@sozonome I copied your code and is working perfectly. Thanks a lot for taking time and looking into this 🙏.

I would like to understand more what is happening here in _document.js with this caching. Is there a resource where I could learn what is happening here inside _document.js and especially for what reason?

Thanks,
Primoz

from nextarter-chakra.

sozonome avatar sozonome commented on August 25, 2024

@sozonome I copied your code and is working perfectly. Thanks a lot for taking time and looking into this 🙏.

I would like to understand more what is happening here in _document.js with this caching. Is there a resource where I could learn what is happening here inside _document.js and especially for what reason?

Thanks,
Primoz

It initally caused by flash of unstyled content issue (FOUC). But I think the current next.js / chakra-ui version already tackle it (either through experimental flag or else, I'll look onto it again, maybe I will remove this _document and emotion cache workaround if its not needed anymore).

References:

from nextarter-chakra.

PrimozRome avatar PrimozRome commented on August 25, 2024

@sozonome understood! I will be keeping my eye on the update.

from nextarter-chakra.

Related Issues (8)

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.