Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeyens committed Dec 9, 2023
1 parent d4a4372 commit ecf96bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,11 @@ const App = () => {
);
};

// Accessing state from the specified scope. Default scope is the closest one
// Accessing state from the specified scope.
const Component = () => {
// Here, we get the state from the parent scope
const [name, setName] = useAppStore('parent').use.name();
// Here, we get the state from the child scope (default)
// Here, we get the state from the closest scope (default)
const onUpdateName = useAppStore().get.onUpdateName().fn;

return (
Expand Down
4 changes: 2 additions & 2 deletions packages/jotai-x/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,11 @@ const App = () => {
);
};

// Accessing state from the specified scope. Default scope is the closest one
// Accessing state from the specified scope.
const Component = () => {
// Here, we get the state from the parent scope
const [name, setName] = useAppStore('parent').use.name();
// Here, we get the state from the child scope (default)
// Here, we get the state from the closest scope (default)
const onUpdateName = useAppStore().get.onUpdateName().fn;

return (
Expand Down

0 comments on commit ecf96bd

Please sign in to comment.