Changing URL but components re-rendering.

I'm working on an application wherein you click on various chapters of a story and it should update the form fields on the page with that chapters content. The URL is changing correctly, but the form fields are not rerendering with the new content. What do?
1 Reply
Donny D
Donny DOP3y ago
most of the query data is changing. But I think the issue may lie within react-hook-form somewhere? oh so I THINK I I've fixed it, but perhaps somebody more experienced could tell me if this is wrong. I had the defaultValues in the <Controllers /> set, but removed that and now just call setValue('key', chapter.title) after the trpc query returns that data in order to populate the form values. Is this bad practice?
Want results from more Discord servers?
Add your server