pmndrs / jotai

👻 Primitive and flexible state management for React

Home Page:https://jotai.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[website] Homepage SSR example is missing import

reinierkaper-carewell opened this issue · comments

Summary

It's a very small thing, but would be good to include: the homepage SSR example doesn't import the Provider, which can be confusing to new users.

https://jotai.org/ => Getting Started => SSR

Link to reproduction

Current

// providers.js (app directory)
'use client'

export default function Providers({ children }) {
  return (
    <Provider>
      {children}
    </Provider>
  )
}

// Snipped for brevity

Proposed:

// providers.js (app directory)
'use client'

import { Provider } from 'jotai'

export default function Providers({ children }) {
  return (
    <Provider>
      {children}
    </Provider>
  )
}

// Snipped for brevity

Check List

N/A

Please feel free to open a PR.