Conversation
🦋 Changeset detectedLatest commit: 17f6d47 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
Size Change: -150 B (-0.13%) Total Size: 114 kB 📦 View Changed
ℹ️ View Unchanged
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #532 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 69 69
Lines 2280 2268 -12
Branches 737 734 -3
=========================================
- Hits 2280 2268 -12 🚀 New features to boost your workflow:
|
This was referenced Sep 28, 2026
Member
// before
const [value, setTrue, setFalse, toggle] = useBooleanState(false);
const [value, setValue, refresh] = useStorageState<string>('token');
const [list, { push, insertAt, updateAt, removeAt, setAll, reset }] = useList<string>(['a', 'b']);
const [map, { set, setAll, remove, reset }] = useMap<string, number>([['a', 1]]);
const [set, { add, remove, toggle, setAll, reset }] = useSet<string>(['a']);
// after (this pr now)
const { value, setTrue, setFalse, toggle } = useBooleanState(false);
const { value, setValue, refresh } = useStorageState<string>('token');
const { list, push, insertAt, updateAt, removeAt, setAll, reset } = useList<string>(['a', 'b']);
const { map, set, setAll, remove, reset } = useMap<string, number>([['a', 1]]);
const { set, add, remove, toggle, setAll, reset } = useSet<string>(['a']);
// or this ???
const [isOpen, { setTrue, setFalse, toggle }] = useBooleanState(false);
const [token, { setValue, refresh }] = useStorageState<string>('token');
const [list, { push, insertAt, updateAt, removeAt, setAll, reset }] = useList<string>(['a', 'b']); // same as before
const [map, { set, setAll, remove, reset }] = useMap<string, number>([['a', 1]]); // same as before
const [set, { add, remove, toggle, setAll, reset }] = useSet<string>(['a']); // same as before |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
useBooleanState,useStorageState,useList,useMap,useSet이 상태와 액션을 단일 객체로 반환해요. 문서와 예제도 함께 수정했어요.[value, actions]대신 노션에서 확정한 평면 객체 형태를 적용했어요.Closes #528
Checklist
yarn run fixto format and lint the code and docs?yarn run test:coverageto make sure there is no uncovered line?