diff --git a/docs/utilities/family.mdx b/docs/utilities/family.mdx index 7f92bdf017..b6894d45df 100644 --- a/docs/utilities/family.mdx +++ b/docs/utilities/family.mdx @@ -71,7 +71,7 @@ This is crucial if you use infinite number of params. There are two ways to remove params. - `myFamily.remove(param)` allows you to remove a specific param. -- `myFamily.setShouldRemove(shouldRemove)` is to register `shouldRemove` function which runs immediately **and** when you are to get an atom from a cache. +- `myFamily.setShouldRemove(shouldRemove)` is to register `shouldRemove` function which runs immediately **and** when you are about to get an atom from a cache. - shouldRemove is a function that takes two arguments `createdAt` in milliseconds and `param`, and returns a boolean value. - setting `null` will remove the previously registered function. diff --git a/docs/utilities/ssr.mdx b/docs/utilities/ssr.mdx index 2d35d52656..346d54ae5b 100644 --- a/docs/utilities/ssr.mdx +++ b/docs/utilities/ssr.mdx @@ -24,6 +24,8 @@ const CounterPage = ({ countFromServer }) => { The primary use case for `useHydrateAtoms` are SSR apps like Next.js, where an initial value is e.g. fetched on the server, which can be passed to a component by props. +⚠️ Note: Although the term "hydrate" might suggest server-side usage, this hook is designed for client-side code and should be used with the [`'use client'` directive](https://react.dev/reference/rsc/use-client). + ```ts // Definition function useHydrateAtoms(