Skip to content

Commit

Permalink
fix(export): fix
Browse files Browse the repository at this point in the history
  • Loading branch information
unadlib committed Feb 25, 2024
1 parent aed3b30 commit b70c592
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mutability",
"version": "0.3.0",
"version": "0.3.1",
"description": "A JavaScript library for transactional mutable updates",
"main": "dist/index.cjs.js",
"unpkg": "dist/index.umd.js",
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { create } from 'mutative';
import * as mutative from 'mutative';
import { apply } from './apply';

/**
* Transactional updates to the base state with the recipe.
*/
export const mutate = <T>(baseState: T, recipe: (state: T) => void) => {
const [, patches] = create(baseState, recipe, {
const [, patches] = mutative.create(baseState, recipe, {
enablePatches: true,
});
apply(baseState, patches);
Expand Down

0 comments on commit b70c592

Please sign in to comment.