Replies: 1 comment
-
|
Ideally we would be able to solve this with Lens... but unfortunately it's not really possible :( |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I know this has been discussed many times, but I wanted to share this minimal reproducible example for those working on the problem.
Setup
This example mocks structures for creating and updating quizzes for school children. The basic idea is that a quiz creator can make a
These structures share some common elements, but are not 100% identical. Furthermore, each question type has Create and Update variations.
Challenge
Below is a re-usable component called
PassageSubformthat one could use to generate thepassagetext area input.At this point, everything works fine. But now lets attempt to include setValue as prop...
Herein lies the error and the crux of the challenge. How do we incorporate props like
setValue,watch,control, etc. into this reusable component while maintaining type safety?Beta Was this translation helpful? Give feedback.
All reactions