Skip to content

Commit

Permalink
[mantine.dev] Add default value documentation for use-local-storage `…
Browse files Browse the repository at this point in the history
…getInitialValueInEffect` (#6388)

* Update use-local-storage.mdx

* Update use-local-storage.mdx

* Update create-storage.ts
  • Loading branch information
toanxyz authored Jun 27, 2024
1 parent d43d076 commit c3b026e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions apps/mantine.dev/src/pages/hooks/use-local-storage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ interface UseLocalStorage<T> {
/** Default value that will be set if value is not found in local storage */
defaultValue?: T;

/** If set to true, value will be updated in useEffect after mount */
getInitialValueInEffect: boolean;
/** If set to true, value will be updated in useEffect after mount. Default value is true. */
getInitialValueInEffect?: boolean;

/** Function to serialize value into a string to be saved in local storage */
serialize?: (value: T) => string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface StorageProperties<T> {
/** Default value that will be set if value is not found in storage */
defaultValue?: T;

/** If set to true, value will be update is useEffect after mount */
/** If set to true, value will be updated in useEffect after mount. Default value is true. */
getInitialValueInEffect?: boolean;

/** Function to serialize value into string to be save in storage */
Expand Down

0 comments on commit c3b026e

Please sign in to comment.