Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vordgi/nimpl-getters
Implementation of server getters in React Server Components without switching to SSR
https://github.com/vordgi/nimpl-getters
frontend nextjs react react-server-components react-server-context server-components-context server-context server-side-rendering servercomponent
Last synced: 1 day ago
JSON representation
Implementation of server getters in React Server Components without switching to SSR
- Host: GitHub
- URL: https://github.com/vordgi/nimpl-getters
- Owner: vordgi
- License: mit
- Created: 2024-01-05T18:56:24.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-28T17:32:50.000Z (3 months ago)
- Last Synced: 2025-01-03T17:11:59.896Z (8 days ago)
- Topics: frontend, nextjs, react, react-server-components, react-server-context, server-components-context, server-context, server-side-rendering, servercomponent
- Language: TypeScript
- Homepage: https://nimpl.tech/docs/getters
- Size: 183 KB
- Stars: 117
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @nimpl/getters
(Former [next-impl-getters](https://www.npmjs.com/package/next-impl-getters))
Implementation of server getters in React Server Components without switching to SSR in Next.js
Before using the library, read the [Possible Issues](https://nimpl.tech/docs/getters#possible-issues)
Visit https://nimpl.tech/docs/getters to view the full documentation.
Use `@nimpl/getters 2.x` for Next.js v15. For earlier versions of Next.js use `@nimpl/getters 1.x`.
## Installation
**Using npm:**
```bash
npm i @nimpl/getters
```**Using yarn:**
```bash
yarn add @nimpl/getters
```## Current Getters
- [get-pathname](https://nimpl.tech/docs/getters#get-pathname)
- [get-params](https://nimpl.tech/docs/getters#get-params)
- [get-page-config](https://nimpl.tech/docs/getters#get-page-config)
- [get-search-params](https://nimpl.tech/docs/getters#get-search-params) (_deprecated_)> _`create-server-context` and `get-server-context` were moved to a separate package - [@nimpl/context](https://nimpl.tech/docs/context)_
## Stability
All getters are covered with tests. Tests are run on every release and every 6 hours on the latest **Canary** version of `Next.js`.
In this way, you can be sure not only of the stability of the code, but also that if there is a breaking change in `Next.js`, this will immediately become known. _Even before the release of a stable version of `Next.js`._
## Additional
Please consider giving a star if you like it, it will help promote the implementation in the eyes of the Next.js team. This also motivates the author to continue working on this and other solutions ❤️
Create issues for identified problems, desired getters, or various improvements.