Skip to content

BrowserSolidLdoProvider only works on client components #2

Description

@njouanin

Following quick start guide, using BrowserSolidLdoProvider in layout.tsx throws :

[browser] Uncaught TypeError: createContext only works in Client Components. Add the "use client" directive at the top of the file to use it. Read more: https://nextjs.org/docs/messages/context-in-server-component
    at module evaluation (app/layout.tsx:4:1)
    at module evaluation (app/layout.tsx:35:1)
  2 | import { Geist, Geist_Mono } from "next/font/google";
  3 | import "./globals.css";
> 4 | import { BrowserSolidLdoProvider } from "@ldo/solid-react";

env:

  • "next": "16.2.6"
  • @solid/react-component": "^0.1.1"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions