From 95323fa597cb9a67ff35f2ee251fa2e737ffb270 Mon Sep 17 00:00:00 2001 From: Jan Vincent Liwanag Date: Fri, 31 May 2024 01:56:51 +0800 Subject: [PATCH] refeator(name): change setState convention to mutateState (#10) --- README.md | 8 ++-- docs/README.md | 8 ++-- docs/modules.md | 4 +- src/index.ts | 12 ++--- test/index.0.snap.ts | 4 +- test/index.test.ts | 106 ++++++++++++++++++++++--------------------- 6 files changed, 73 insertions(+), 69 deletions(-) diff --git a/README.md b/README.md index 9e6d94c..8d87361 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Provide you can create immutable state easily with mutable way. import { useMutative } from 'use-mutative'; export function App() { - const [state, setState] = useMutative({ + const [state, mutateState] = useMutative({ foo: 'bar', list: [{ text: 'todo' }], }); @@ -42,7 +42,7 @@ export function App() {