-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(react): remove <Await/>
#234
Conversation
🦋 Changeset detectedLatest commit: 0a7829b The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov Report
@@ Coverage Diff @@
## main #234 +/- ##
===========================================
- Coverage 100.00% 98.63% -1.37%
===========================================
Files 22 25 +3
Lines 850 878 +28
Branches 150 152 +2
===========================================
+ Hits 850 866 +16
- Misses 0 12 +12
|
b242922
to
6498557
Compare
6498557
to
a1bbe01
Compare
import type { ReactNode } from 'react' | ||
|
||
const suspendIsNeed = { current: true } | ||
type SuspendProps = { during: number; toShow?: ReactNode } | ||
export const Suspend = ({ during, toShow }: SuspendProps) => { | ||
if (suspendIsNeed.current) { | ||
throw new Promise((resolve) => | ||
setTimeout(() => { | ||
suspendIsNeed.current = false | ||
resolve('resolved') | ||
}, during) | ||
) | ||
} | ||
return <>{toShow}</> | ||
} | ||
Suspend.reset = () => { | ||
suspendIsNeed.current = true | ||
} | ||
|
||
export const delay = (ms: number) => new Promise((resolve) => setTimeout(() => resolve('done'), ms)) | ||
|
||
export const TEXT = 'TEXT' as const | ||
export const ERROR_MESSAGE = 'ERROR_MESSAGE' as const | ||
export const FALLBACK = 'FALLBACK' as const | ||
export const MS_100 = 100 as const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@minsoo-web I think this will be good to make inner code as internal dev package. but not now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay !!
Deployment failed with the following error:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GooD!! 🔥🔥
# Overview <!-- A clear and concise description of what this pr is about. --> I add new dev package @suspensive/test-utils to gather test-utils resolve #234 (comment) ## PR Checklist - [x] I did below actions if need 1. I read the [Contributing Guide](https://github.com/suspensive/react/blob/main/CONTRIBUTING.md) 2. I added documents and tests.
fix #203 # Overview I remove `<Await/>` to get below 2 things 1. to get below in @suspensive/react - remove use-sync-external-store. it will fix #203 - remove subpath. it will fix unnecessary node v10 resolution problem - add lint:attw (check our status of are the types wrong in [this](https://arethetypeswrong.github.io/?p=%40suspensive%2Freact%401.16.1)) this validate many things ![image](https://github.com/suspensive/react/assets/61593290/643eaf4b-567d-4382-81f5-8aeca22aec37) 2. to maintain `<Await/>` - add @suspensive/react-await <!-- A clear and concise description of what this pr is about. --> ## PR Checklist - [x] I did below actions if need 1. I read the [Contributing Guide](https://github.com/toss/slash/blob/main/.github/CONTRIBUTING.md) 2. I added documents and tests. Co-authored-by: Eric Butler <eric@codebutler.com> --------- Co-authored-by: Minsoo Kim <zlemzlem5656@naver.com>
# Overview <!-- A clear and concise description of what this pr is about. --> I add new dev package @suspensive/test-utils to gather test-utils resolve #234 (comment) ## PR Checklist - [x] I did below actions if need 1. I read the [Contributing Guide](https://github.com/suspensive/react/blob/main/CONTRIBUTING.md) 2. I added documents and tests.
fix #203 # Overview I remove `<Await/>` to get below 2 things 1. to get below in @suspensive/react - remove use-sync-external-store. it will fix #203 - remove subpath. it will fix unnecessary node v10 resolution problem - add lint:attw (check our status of are the types wrong in [this](https://arethetypeswrong.github.io/?p=%40suspensive%2Freact%401.16.1)) this validate many things ![image](https://github.com/suspensive/react/assets/61593290/643eaf4b-567d-4382-81f5-8aeca22aec37) 2. to maintain `<Await/>` - add @suspensive/react-await <!-- A clear and concise description of what this pr is about. --> ## PR Checklist - [x] I did below actions if need 1. I read the [Contributing Guide](https://github.com/toss/slash/blob/main/.github/CONTRIBUTING.md) 2. I added documents and tests. ---------
# Overview <!-- A clear and concise description of what this pr is about. --> I add new dev package @suspensive/test-utils to gather test-utils resolve #234 (comment) ## PR Checklist - [x] I did below actions if need 1. I read the [Contributing Guide](https://github.com/suspensive/react/blob/main/CONTRIBUTING.md) 2. I added documents and tests.
fix #203 # Overview I remove `<Await/>` to get below 2 things 1. to get below in @suspensive/react - remove use-sync-external-store. it will fix #203 - remove subpath. it will fix unnecessary node v10 resolution problem - add lint:attw (check our status of are the types wrong in [this](https://arethetypeswrong.github.io/?p=%40suspensive%2Freact%401.16.1)) this validate many things ![image](https://github.com/suspensive/react/assets/61593290/643eaf4b-567d-4382-81f5-8aeca22aec37) 2. to maintain `<Await/>` - add @suspensive/react-await <!-- A clear and concise description of what this pr is about. --> ## PR Checklist - [x] I did below actions if need 1. I read the [Contributing Guide](https://github.com/toss/slash/blob/main/.github/CONTRIBUTING.md) 2. I added documents and tests. Co-authored-by: Eric Butler <eric@codebutler.com> --------- Co-authored-by: Minsoo Kim <zlemzlem5656@naver.com>
# Overview <!-- A clear and concise description of what this pr is about. --> I add new dev package @suspensive/test-utils to gather test-utils resolve #234 (comment) ## PR Checklist - [x] I did below actions if need 1. I read the [Contributing Guide](https://github.com/suspensive/react/blob/main/CONTRIBUTING.md) 2. I added documents and tests.
fix #203
Overview
I remove
<Await/>
to get below 2 thingsthis validate many things
<Await/>
PR Checklist
Co-authored-by: Eric Butler eric@codebutler.com