refactor: destructure loaderData in multiple components for cleaner code
This commit is contained in:
@@ -43,7 +43,7 @@ export const FormRegister = () => {
|
||||
const [disabled, setDisabled] = useState(false)
|
||||
const fetcher = useFetcher()
|
||||
const loaderData = useRouteLoaderData<typeof loader>('routes/_news')
|
||||
const subscriptions = loaderData?.subscriptionsData
|
||||
const { subscriptionsData: subscriptions } = loaderData || {}
|
||||
|
||||
const formMethods = useRemixForm<TRegisterSchema>({
|
||||
mode: 'onSubmit',
|
||||
|
||||
Reference in New Issue
Block a user