Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyfromundefined committed Jan 20, 2025
1 parent 1195405 commit 3213381
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions integrations/react/src/future/stackflow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,6 @@ export function stackflow<
loaderPlugin(input.config),
];

const [activityComponentMap, setActivityComponentMap] = useState(
() => input.components,
);

const registerActivityComponent = useCallback<RegisterActivityComponentFn>(
({ activityName, Component }) => {
setActivityComponentMap((prevState) => ({
...prevState,
[activityName]: Component,
}));
},
[],
);

const enoughPastTime = () =>
new Date().getTime() - input.config.transitionDuration * 2;

Expand Down Expand Up @@ -114,6 +100,20 @@ export function stackflow<
[],
);

const [activityComponentMap, setActivityComponentMap] = useState(
() => input.components,
);

const registerActivityComponent = useCallback<RegisterActivityComponentFn>(
({ activityName, Component }) => {
setActivityComponentMap((prevState) => ({
...prevState,
[activityName]: Component,
}));
},
[],
);

const coreStore = useMemo(() => {
const prevCoreStore = getCoreStore();

Expand Down

0 comments on commit 3213381

Please sign in to comment.