Skip to content
Open
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
1d34a5e
initial commit
Henry8192 Jun 22, 2025
a8e70ec
update Zustand store docs naming conventions & creation
Henry8192 Jun 26, 2025
4598dc9
add zustand slicing and store usage docs.
Henry8192 Jun 26, 2025
8c8be4d
Apply suggestions from code review
Henry8192 Jun 27, 2025
22526a6
patch previous commit
Henry8192 Jun 27, 2025
2159be2
apply the rest of suggestions
Henry8192 Jun 28, 2025
f92f375
move state values section
Henry8192 Jun 28, 2025
56a46b5
address coderabbit review
Henry8192 Jun 28, 2025
678c4cf
Apply suggestions from code review
Henry8192 Jun 30, 2025
8f96f8e
remove extra spaces
Henry8192 Jun 30, 2025
f5f00b7
Merge branch 'main' into zustand-store-docs
junhaoliao Jun 30, 2025
f5822d6
Update examples
Henry8192 Jun 30, 2025
d02feb6
address comment
Henry8192 Jul 8, 2025
08e9a07
specify when to slice
Henry8192 Jul 9, 2025
19c7959
Apply suggestions from code review
Henry8192 Jul 10, 2025
3dbb7ad
Merge branch 'main' into zustand-store-docs
Henry8192 Aug 11, 2025
c97fa29
Merge branch 'main' into zustand-store-docs
Henry8192 Aug 22, 2025
da469a6
Merge branch 'main' into zustand-store-docs
junhaoliao Sep 2, 2025
eb38e38
Merge branch 'main' into zustand-store-docs
junhaoliao Sep 12, 2025
e5842c4
docs: Update Zustand store naming and structure guidelines for clarit…
junhaoliao Sep 13, 2025
31faf0a
Merge branch 'main' into zustand-store-docs
Henry8192 Sep 17, 2025
515406c
address review
Henry8192 Sep 19, 2025
edfbb8c
Merge branch 'main' into zustand-store-docs
Henry8192 Oct 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/src/dev-guide/coding-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ Examples:
* `arrayIndexIdx` for a 0-based indexing variable.
* `numEvents` for the total number of events.

## Zustand store actions
When implementing Zustand store actions, we follow these naming conventions:

* Use `setX` for actions that simply change the value of a state.
* Use `updateX` for actions that do more than simply changing a value (e.g., perform additional logic, make API calls, update multiple states).

# React

## Omitting state variables from React Hooks
Expand Down