Skip to content

How do I integrate tanstack query with formOptions? #1311

Closed Answered by JavierBrooktec
shin616122 asked this question in General
Discussion options

You must be logged in to vote
const mockOptions = getMyFormOpts();

export const MyChildComponent = withForm({
  ...mockOptions, // this is just for typescript check https://tanstack.com/form/latest/docs/framework/react/guides/form-composition#breaking-big-forms-into-smaller-pieces
render: function Render({ form }) {
    const dataName = useStore(form.store, state => state.values.name); // you can subscribe to the data

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@shin616122
Comment options

@JavierBrooktec
Comment options

Answer selected by shin616122
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants