use-swr-component
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

use-swr-component

Use SWR to fetch Component in dynamic, that component could be server component or client component.

Usage

<UseSWRComponent
  props={{ prop1, prop2 }}
  Component={YourServerComponent}
  fallbackData={<YourServerComponent {...{ prop1, prop2 }} />}
  refreshInterval={1000}
/>

Readme

Keywords

Package Sidebar

Install

npm i use-swr-component

Weekly Downloads

2,209

Version

0.0.7

License

MIT

Unpacked Size

194 kB

Total Files

6

Last publish

Collaborators

  • snomiao