Reusable component with multiple form input fields
Hey Everyone,
I’m trying to figure out how I can create a reusable component that I can use on multiple resources without having to type the same items over an over.
I want to create a component called “Link” with the following fields.
4 Replies
Put them wherever you want, and call them? Just add them as static functions and return them 🙂
Check out Sharing fields between the resource form and wizards. Same logic can be applied to anything (not strictly tied to a wizard; like its shown)
Thanks @toeknee . Any suggestions on how I can do a mutation on the data if it’s used? Similar to the above question, I’d like to only have to write the mutation once.
Add a mutation function too and just call that where needed?