Skip to content

Commit

Permalink
docs: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
manudeli committed Oct 5, 2023
1 parent eb4e68c commit 936349d
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,13 @@ All declarative components to use suspense on both CSR, SSR.

### Features

- Suspense (containing CSROnly mode)
- ErrorBoundary
- ErrorBoundaryGroup
- AsyncBoundary (containing CSROnly mode)
- Delay
- SuspensiveProvider
- HOC(Higher Order Component)s
- useAwait, Await, awaitClient (Experimental)
- Suspense, withSuspense (containing CSROnly)
- ErrorBoundary, withErrorBoundary, useErrorBoundary
- ErrorBoundaryGroup, withErrorBoundaryGroup, useErrorBoundaryGroup
- AsyncBoundary, withAsyncBoundary (containing CSROnly)
- Delay, withDelay
- SuspensiveProvider, Suspensive
- Await, useAwait, awaitClient (Experimental)

### Installation

Expand All @@ -60,18 +59,19 @@ yarn add @suspensive/react
### Usage

```tsx
import { Suspense, ErrorBoundary, ErrorBoundaryGroup } from '@suspensive/react'
import { Suspense, ErrorBoundary, ErrorBoundaryGroup, Delay } from '@suspensive/react'

const Example = (
const Example = () => (
<ErrorBoundaryGroup>
<ErrorBoundaryGroup.Reset trigger={(group) => <Button onClick={group.reset}>Reset All</Button>} />
<ErrorBoundary fallback={(caught) => <Button onClick={caught.reset}>Reset {caught.error}</Button>}>
<Suspense fallback={<Spinner />}>
<SuspendedComponent />
</Suspense>
</ErrorBoundary>
<ErrorBoundary fallback={(caught) => <Button onClick={caught.reset}>Reset {caught.error}</Button>}>
<Suspense fallback={<Spinner />}>
<ErrorBoundary fallback={(caught) => <Button onClick={caught.reset}>Reset {caught.error.message}</Button>}>
<Suspense
fallback={
<Delay>
<Spinner />
</Delay>
}
>
<SuspendedComponent />
</Suspense>
</ErrorBoundary>
Expand Down Expand Up @@ -118,7 +118,7 @@ import { Suspense } from '@suspensive/react'
import { QueryErrorBoundary, useSuspenseQuery } from '@suspensive/react-query'

const Example = () => (
<QueryErrorBoundary fallback={(caught) => <Button onClick={caught.reset}>Reset {caught.error}</Button>}>
<QueryErrorBoundary fallback={(caught) => <Button onClick={caught.reset}>Reset {caught.error.message}</Button>}>
<Suspense fallback={<Spinner />}>
<SuspendedComponent />
</Suspense>
Expand Down

1 comment on commit 936349d

@vercel
Copy link

@vercel vercel bot commented on 936349d Oct 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./websites/docs

docs-git-main-suspensive.vercel.app
suspensive.org
www.suspensive.org
docs.suspensive.org
docs-suspensive.vercel.app

Please sign in to comment.