Skip to content

Commit ca884f5

Browse files
committed
Fix Nimbus OutletContext not being updated with client data
For some weird reason, useRouteLoaderData in the root.tsx App function does not receive/update its data when clientLoader is loaded. Changing to useLoaderData instead seems to fix the issue.
1 parent ed81119 commit ca884f5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

apps/cyberstorm-remix/app/root.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import {
1515
useLocation,
1616
useMatches,
1717
useRouteError,
18-
useRouteLoaderData,
1918
} from "react-router";
2019
// import { LinksFunction } from "@remix-run/react/dist/routeModules";
2120
import { Provider as RadixTooltip } from "@radix-ui/react-tooltip";
@@ -580,7 +579,7 @@ const TooltipProvider = memo(function TooltipProvider({
580579
});
581580

582581
function App() {
583-
const data = useRouteLoaderData<RootLoadersType>("root");
582+
const data = useLoaderData<RootLoadersType>();
584583
const dapper = new DapperTs(() => {
585584
return {
586585
apiHost: data?.publicEnvVariables.VITE_API_URL,

0 commit comments

Comments
 (0)