Code Monkey home page Code Monkey logo

Comments (7)

gasscoelho avatar gasscoelho commented on May 25, 2024 12

@eeeman1 are you using some SSR like Next.js or something like that? I believe the V3 doesn't support SSR. I'm having a problem with document is not defined too, but that's because Node.js doesn't have access to the DOM API as document for example. So every time your app renders though the backend you'll get this error.

P.S. If you are not using any SSR then ignore this comment πŸ˜…

from emoji-picker-react.

archywillhe avatar archywillhe commented on May 25, 2024 11

yeah getting this cuz of ssr. To turn of ssr use dynmaic~

import dynamic from "next/dynamic";
const NoSSRComponent = dynamic(() => import("../components/NoSSRComponent"), {
  ssr: false,
});

from emoji-picker-react.

ealush avatar ealush commented on May 25, 2024

Hey @eeeman1, your example is not sufficient for me to reproduce what you're describing. See this: https://stackblitz.com/edit/emoji-picker-react-gv9idx?file=index.js

Can you try to create a new blitz that reproduces your bug?

from emoji-picker-react.

ealush avatar ealush commented on May 25, 2024

@gasscoelho hey, in general, no, the picker does not support ssr - and I believe it also shouldn't for multiple reasons.

The technical reason it doesn't support ssr is due to the way css is handled. If you really need ssr support, you could probably grab the files directly from source, and configure transpiling of that module as well.

I would recommend, though, unless you really need the picker visible on initial load not to render it on the server, but instead show it later, or even better - dynamically import it later on. It is a pretty heavy component with lots of assets, and thousands of elements. It also runs a pretty intense mapping of search keywords right at start.

from emoji-picker-react.

matheusslg avatar matheusslg commented on May 25, 2024

#184 (comment)

from emoji-picker-react.

Riaz5687 avatar Riaz5687 commented on May 25, 2024

use dynamic import in nextjs it just because of serverside rendering

from emoji-picker-react.

ealush avatar ealush commented on May 25, 2024

closing as duplicate of #184

from emoji-picker-react.

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.