Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Document object not defined Next js

// You might want to initialize this to a placeholder like
// let Picker = <div />
let Picker;

if (process.browser) {
    console.log('We can access the window object');
    // Now let's do the dynamic import of that component we want to use
    Picker = dynamic(() => import("emoji-picker-react"))
}
 
PREVIOUS NEXT
Tagged: #Document #object #defined #Next #js
ADD COMMENT
Topic
Name
2+6 =