-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(react): function children of Delay (#1312)
close #1300 # Overview <!-- A clear and concise description of what this pr is about. --> ### Problem ```tsx const Example = () => { const useState(false) return ( <Delay ms={1000}> {/* just expose Modal ui after 1000ms. if we need to open with delay, we can't support it */} <Modal isOpen={!isDelayed} /> </Delay> ) } ``` ### Solution ```tsx const Example = () => { const useState(false) return ( <Delay ms={1000}> {({ isDelayed }) => ( // We can support from now! <Modal isOpen={!isDelayed} /> )} </Delay> ) } ``` But, I'm not confident for this feature. so I marked this feature as experimental feature ## PR Checklist - [x] I did below actions if need 1. I read the [Contributing Guide](https://github.com/toss/suspensive/blob/main/CONTRIBUTING.md) 2. I added documents and tests. --------- Co-authored-by: Juhyeok Kang <[email protected]> Co-authored-by: 김석진(poki) <[email protected]>
- Loading branch information
1 parent
f7a2ebe
commit 643f8bd
Showing
5 changed files
with
95 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@suspensive/react": minor | ||
--- | ||
|
||
feat(react): function children of Delay |
This file contains 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
This file contains 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
This file contains 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
This file contains 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