Skip to content

Commit

Permalink
feat: suspend cache keys
Browse files Browse the repository at this point in the history
  • Loading branch information
isaac-mason committed Apr 14, 2024
1 parent 244e335 commit d889d92
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/react-three-jolt/src/components/Physics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,11 @@ export const Physics: FC<PhysicsProps> = (props) => {
// =================================================
//* Module initialization
//if the user passed a module path try to load it
if (module) suspend(async () => initJolt(module), []);
else suspend(() => initJolt(), []);
if (module) {
suspend(() => initJolt(module), ["jolt", module]);
} else {
suspend(() => initJolt(), ["jolt"]);
}
// =================================================
const jolt = Raw.module;
const pid = useId();
Expand Down

0 comments on commit d889d92

Please sign in to comment.