Socket
Socket
Sign inDemoInstall

@plasmicapp/query

Package Overview
Dependencies
6
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @plasmicapp/query

This is a mini isomorphic, _component-level_ data-fetching library. It lets you fetch data client-side or server-side. On the server, it lets you fetch data from any component, Suspense-style.


Version published
Weekly downloads
22K
decreased by-4.02%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

@plasmicapp/query

This is a mini isomorphic, component-level data-fetching library. It lets you fetch data client-side or server-side. On the server, it lets you fetch data from any component, Suspense-style.

Normally in frameworks like Next.js, you cannot couple your data fetches with your components--you need to fetch from getStaticProps/getServerSideProps. If you fetch from a component, it must happen client-side (ultimately via a useEffect or similar). This also has other ramifications, e.g. your data fetching cannot depend on dynamic props.

This library lets you express your fetches directly in your components, but still ultimately executed at pre-render time (from getStaticProps/getServerSideProps).

Learn more about how this can be used with Plasmic specifically in the docs: https://docs.plasmic.app/learn/data-code-components/.

The library a small API built around react-swr and react-ssr-prepass.

FAQs

Last updated on 29 Jan 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc