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

TypeScript error when using <SliceZone> with Next.js's next/dynamic #155

Closed
angeloashmore opened this issue Jun 7, 2022 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@angeloashmore
Copy link
Member

Details to be posted later

Issue reported by @kb1995

Versions

  • @prismicio/react:
  • react:
  • node:

Reproduction

Additional Details

Steps to reproduce

What is expected?

What is actually happening?

@angeloashmore angeloashmore added the bug Something isn't working label Jun 7, 2022
@angeloashmore angeloashmore self-assigned this Jun 8, 2022
@angeloashmore
Copy link
Member Author

I was unable to reproduce on the latest version of @prismicio/react (v2.4.2) and next/dynamic.

v2.4.2 included a change to <SliceZone> that relaxed the type requirements which may have resolved the type incompatibility.

It's worth noting that Slice components provided to <SliceZone> must still be typed with SliceComponentProps as those are the only props that will be passed to the component.

See #154 for examples of using SliceComponentProps using different combinations of types.

@angeloashmore angeloashmore closed this as not planned Won't fix, can't repro, duplicate, stale Jun 16, 2022
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