Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use LSM in Next.js 14 (app router) #151

Open
spacecat opened this issue Jul 23, 2024 · 1 comment
Open

How to use LSM in Next.js 14 (app router) #151

spacecat opened this issue Jul 23, 2024 · 1 comment

Comments

@spacecat
Copy link

Hi,

I searched the issues here and someone mentioned to use ssr: false using a dynamic import but I can't get it to work.

const createStore = dynamic(
  () => import("little-state-machine").then((mod) => mod.createStore),
  { ssr: false },
);

What is the correct way to import LSM in a Next.js 14 (app router) app?

@SoloReverse
Copy link

Dont import the module with dynamic. import the module in a component file then import the component with dynamic and ssr false as you did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants