Hey, I was taking a look at react query example at: https://github.com/mantinedev/mantine/blob/master/apps/mantine.dev/src/pages/form/values.mdx. I am doing something very similar. In that example form is missing in the useEffect dependencies array. My linter is complaining about form not being part of the dependency array, I legit wonder if it's a good idea for my to open an improvement PR to update the docs to something like:
useEffect(() => {
if (query.data) {
if(!form.initialized) {
// Even if query.data changes, form will be initialized only once
form.initialize(query.data);
}
}
}, [form, query.data]);
If check is needed to prevent form.initialize from triggering the same effect over and over.