superjson
babel-plugin-superjson-next
Our great sponsors
superjson | babel-plugin-superjson-next | |
---|---|---|
9 | 3 | |
3,678 | 125 | |
8.7% | 0.0% | |
7.6 | 0.0 | |
4 months ago | 6 months ago | |
TypeScript | TypeScript | |
MIT License | 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.
superjson
-
Deep Cloning Objects in JavaScript, the Modern Way
I wasn't aware of this, I would like to give a shout out to superjson (https://github.com/blitz-js/superjson) which I had been using to solve this problem. I will look at this solution for next time.
- Superjson – serialize JavaScript Dates, Maps, Sets to cross service boundaries
- GitHub - blitz-js/superjson: Safely serialize JavaScript expressions to a superset of JSON, which includes Dates, BigInts, and more.
- Superjson: Safely serialize JavaScript expressions to a superset of JSON
- Aplicativos da Web totalmente tipados
-
I've spent the whole day on this, but no luck, I wanna die :)
Here you go https://github.com/blitz-js/superjson
-
Rich on serialization
superjson has a plugin system and also supports ObjectId. https://github.com/blitz-js/superjson/pull/71
-
Prisma not working with next serversideprops
Hey Mahmoud from Prisma here 👋🏼 Next.js doesn't serialize the Date type. There are a couple of workarounds discussed in this GitHub discussion. Personally, I found that using superjson to be the simplest approach.
babel-plugin-superjson-next
-
Building a Serverless Application with Next.js and CockroachDB!
Now, create a new file .babelrc and configure it for superjson:
-
Next.js 12: Rust compiler, Middleware, Native ESM, URL Imports, React Server Components
For example, I've been opted out of swc compiling because I use babel-plugin-superjson-next to serialize dates in JSON so they can be sent to the client. Luckily this seems to be a fairly common use case so they'll probably support it soon.
-
Has anyone using firestore and getServerSideProps run into issues with serialization and timestamps? Can you share some code on how you solved it?
You can use superjson-next to (de)serialize dates, but you'll still need to convert the timestamps to dates before then.
What are some alternatives?
SurveyJS - Free Open-Source JavaScript form builder library with integration for React, Angular, Vue, jQuery, and Knockout that lets you load and run multiple web forms, or build your own self-hosted form management system, retaining all sensitive data on your servers. You have total freedom of choice as to the backend, because any server + database combination is fully compatible.
Killed by Google - Part guillotine, part graveyard for Google's doomed apps, services, and hardware.
blitz-guard - Blitz Guard - The centralized permission based authorization for Blitz.js
JSONForms - Customizable JSON Schema-based forms with React, Angular and Vue support out of the box.
monarch-map
Next.js - The React Framework
Prisma - Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB
remix-routes - Typesafe routing for your Remix apps.
builder - Drag and drop headless CMS for React, Vue, Svelte, Qwik, and more
SvelteKit - web development, streamlined
jsonx - JSONX - Create React Elements, JSX and HTML from JSON