Skip to content

Commit

Permalink
Release 0.11.1
Browse files Browse the repository at this point in the history
feat: 优化 cacheKey 性能消耗
  • Loading branch information
CJY0208 authored May 20, 2022
1 parent 2342b3e commit 80aa2a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-activation",
"version": "0.11.0",
"version": "0.11.1",
"description": "<KeepAlive /> for React like <keep-alive /> in vue",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -42,7 +42,7 @@
"dependencies": {
"create-react-context": "^0.3.0",
"hoist-non-react-statics": "^3.3.0",
"react-node-key": "^0.3.1",
"react-node-key": "^0.4.0",
"szfe-tools": "^0.0.0-beta.7"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/core/withAliveScope.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const expandKeepAlive = (KeepAlive) => {
return isOutsideAliveScope ? (
get(props, 'children', null)
) : (
<NodeKey prefix={idPrefix} key={props._nk}>
<NodeKey prefix={idPrefix} key={props._nk} manualKey={props.cacheKey}>
{(nkId) => {
const id = props.cacheKey || nkId

Expand Down

0 comments on commit 80aa2a9

Please sign in to comment.