Skip to content

Commit

Permalink
✅ test: On nested map changes, invoke patchStore
Browse files Browse the repository at this point in the history
  • Loading branch information
joebobmiles committed Jul 13, 2021
1 parent 0e3ecb1 commit e278e35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
StoreApi,
} from "zustand/vanilla";
import * as Y from "yjs";
import { patchSharedType, } from "./patching";
import { patchSharedType, patchStore, } from "./patching";

/**
* This function is the middleware the sets up the Zustand store to mirror state
Expand Down Expand Up @@ -60,7 +60,7 @@ export const yjs = <S extends State>(
*/
map.observeDeep(() =>
{
// TODO
patchStore(api, map.toJSON());
});

// Return the initial state to create or the next middleware.
Expand Down

0 comments on commit e278e35

Please sign in to comment.