Skip to content
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

in a custom app getInitialProps the first own prop is [Function: withSuperJSON] instead of the value #89

Open
1 task done
neotrow opened this issue Jul 18, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@neotrow
Copy link

neotrow commented Jul 18, 2023

Verify Next.js canary release

  • I verified that the issue exists in the latest Next.js canary release

Describe the bug

I'm trying to return props from a custom app getInitialProps function. But for some reason the first own property is always [Function: withSuperJSON] instead of the actual property.

Example here:
https://github.com/neotrow/next-superjson-test/blob/main/pages/_app.tsx#L30

Expected behavior

I would expect the above mentioned console log to be
ownProps { prop1: 'foo', prop2: 'bar', prop3: 'baz' }
and not
ownProps { prop1: [Function: withSuperJSON], prop2: 'bar', prop3: 'baz' }

Reproduction link

https://github.com/neotrow/next-superjson-test

Version

0.5.9

Config

/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true,
  experimental: {
    swcPlugins: [["next-superjson-plugin", {}]],
  },
};

module.exports = nextConfig;

Additional context

No response

@neotrow neotrow added the bug Something isn't working label Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant