gradual-typing-bib
next-rpc
gradual-typing-bib | next-rpc | |
---|---|---|
1 | 4 | |
246 | 141 | |
- | - | |
4.1 | 0.0 | |
5 months ago | over 1 year ago | |
Racket | TypeScript | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
gradual-typing-bib
-
An Inconsistent Truth: Next.js and Typesafety
> with an implicit type contract (potentially generated) through the creation of these files
Racket is able to automatically convert static types of Typed Racket into contracts when values flow between typed and untyped worlds. This happens automatically and transparently, which means you don't have to worry about almost at all. One advantage Racket has over JS is the module system (well, it holds the same advantage over almost all the other languages), which allows typed and untyped code to reside in the the same file, yet have a clear boundary between them.
I can't find it right now, but there was a paper describing how it works. It's probably somewhere here: https://github.com/samth/gradual-typing-bib (if you're curious enough to read many tens of abstracts...)
next-rpc
-
An Inconsistent Truth: Next.js and Typesafety
I recommend "next-rpc" [1] which is a small library allows the nextjs client-side pages to call the API function using a type-checked function interface.
[1] https://github.com/Janpot/next-rpc
-
RPC in Next.js
When I was searching for JSON-RPC implementation for Node and Next. I've found this little gem, library next-rpc.
-
next-rpc makes exported functions from API routes directly accessible in components. Just import your API function and call it anywhere you want.
They've explained it well in the README: https://github.com/Janpot/next-rpc#why-this-library-is-needed
What are some alternatives?
assert-combinators - Functional assertion combinators.
react-query - 🤖 Powerful asynchronous state management, server-state utilities and data fetching for TS/JS, React, Solid, Svelte and Vue. [Moved to: https://github.com/TanStack/query]
wundergraph-demo - This Repository demonstrates how to combine 7 APIs (4 Apollo Federation SubGraphs, 1 REST, 1 standalone GraphQL, 1 Mock) into one unified GraphQL API which is then securely exposed as a JSON API to a NextJS Frontend.
SWR - React Hooks for Data Fetching
refute - Refute module.