New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
_app.tsx not getting parsed data #54
Comments
Do you want to get deserialized props by reading If so, use the // _app.tsx
import type { AppProps } from "next/app";
import { deserializeProps } from 'next-superjson-plugin/tools'
export default function App({ Component, pageProps }: AppProps) {
const deserialized = deserializeProps(pageProps);
// ...
return <Component {...pageProps} />;
} |
It seems like it stringify bigints as strings, but in the {
id: 1,
version: 1,
price_min: 1n,
price_max: 999999999n,
size_min: 1n,
size_max: 9999999999999n,
} what I receive in {
id: 1,
version: 1,
price_min: "1",
price_max: "999999999",
size_min: "1",
size_max: "9999999999999",
} |
That's the expected consequences, not the bug. See the {
id: 1,
version: 1,
price_min: "1",
price_max: "999999999",
size_min: "1",
size_max: "9999999999999",
_superjson: {values: {…}} // this property contains type data
} Actual deserialization is being done by the component in the way of referring to the If you can't find |
Verify Next.js canary release
Describe the bug
I'm using getServerSideProps to fetch some data and return it in props and in the
_app.tsx
file I want to use that data.The problem is, I have a few bigint properties in the data but in the
_app.tsx
file bigint are still strings.I checked on the page itself and the data are parsed as expected bigint are bigint.
Expected behavior
parsed the data.
Reproduction link
No response
Version
0.4.9
Config
Additional context
next: v12.3.2-canary.43
The text was updated successfully, but these errors were encountered: