Skip to content

Commit fb8a39b

Browse files
authored
Merge pull request #11 from filefoxper/3.3.2
## v3.3.2 2021-05-24
2 parents 2be8093 + 302f09c commit fb8a39b

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

docs/changes.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,8 @@
1414

1515
## v3.3.0 2021-05-07
1616

17-
* [build] decrease the package size with a `es` package. [See details](/introduction?id=installation) .
17+
* [build] decrease the package size with a `es` package. [See details](/introduction?id=installation) .
18+
19+
## v3.3.2 2021-05-24
20+
21+
* [bug] fix the problem about `useAgentMethods` can not update the state itself.

docs/zh/changes.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,8 @@
1414

1515
## v3.3.0 2021-05-07
1616

17-
* [build] 提供了 `es` 包,以便减小编译后的包体积。[参考详情](/zh/introduction?id=安装)
17+
* [编译] 提供了 `es` 包,以便减小编译后的包体积。[参考详情](/zh/introduction?id=安装)
18+
19+
## v3.3.2 2021-05-24
20+
21+
* [bug] 修复 `useAgentMethods` 不能更新 state 的问题。

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "use-agent-reducer",
3-
"version": "3.3.0",
3+
"version": "3.3.2",
44
"main": "./index.js",
55
"author": "Jimmy.Harding",
66
"description": "the purpose of this project is make useReducer classify",

src/index.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,16 +182,11 @@ export function useAgentMethods<T extends OriginAgent<S>, S>(
182182
...env,
183183
legacy: false,
184184
expired: false,
185-
updateBy: 'manual',
186185
});
187186
}
188187

189188
const { current: reducer } = reducerRef;
190189

191-
const dispatch = useCallback(() => {}, []);
192-
193-
reducer.update(entry.state, dispatch);
194-
195190
useEffect(
196191
() => () => {
197192
const { current: red } = reducerRef;

0 commit comments

Comments
 (0)