@viewfly/core 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/index.esm.js +9 -4
- package/bundles/index.js +9 -4
- package/package.json +2 -2
package/bundles/index.esm.js
CHANGED
|
@@ -1099,18 +1099,23 @@ function Context(props) {
|
|
|
1099
1099
|
function createContextComponent(providers) {
|
|
1100
1100
|
return withAnnotation({
|
|
1101
1101
|
providers,
|
|
1102
|
-
}, () => {
|
|
1102
|
+
}, (childProps) => {
|
|
1103
1103
|
return () => {
|
|
1104
|
-
return
|
|
1104
|
+
return childProps.children;
|
|
1105
1105
|
};
|
|
1106
1106
|
});
|
|
1107
1107
|
}
|
|
1108
1108
|
let contextComponent = createContextComponent(props.providers);
|
|
1109
|
-
onPropsChanged((newProps) => {
|
|
1109
|
+
onPropsChanged((newProps, oldProps) => {
|
|
1110
|
+
if (newProps.providers === oldProps.providers) {
|
|
1111
|
+
return;
|
|
1112
|
+
}
|
|
1110
1113
|
contextComponent = createContextComponent(newProps.providers);
|
|
1111
1114
|
});
|
|
1112
1115
|
return () => {
|
|
1113
|
-
return jsx(contextComponent, {
|
|
1116
|
+
return jsx(contextComponent, {
|
|
1117
|
+
children: props.children
|
|
1118
|
+
});
|
|
1114
1119
|
};
|
|
1115
1120
|
}
|
|
1116
1121
|
function jsx(type, props, key) {
|
package/bundles/index.js
CHANGED
|
@@ -1101,18 +1101,23 @@ function Context(props) {
|
|
|
1101
1101
|
function createContextComponent(providers) {
|
|
1102
1102
|
return withAnnotation({
|
|
1103
1103
|
providers,
|
|
1104
|
-
}, () => {
|
|
1104
|
+
}, (childProps) => {
|
|
1105
1105
|
return () => {
|
|
1106
|
-
return
|
|
1106
|
+
return childProps.children;
|
|
1107
1107
|
};
|
|
1108
1108
|
});
|
|
1109
1109
|
}
|
|
1110
1110
|
let contextComponent = createContextComponent(props.providers);
|
|
1111
|
-
onPropsChanged((newProps) => {
|
|
1111
|
+
onPropsChanged((newProps, oldProps) => {
|
|
1112
|
+
if (newProps.providers === oldProps.providers) {
|
|
1113
|
+
return;
|
|
1114
|
+
}
|
|
1112
1115
|
contextComponent = createContextComponent(newProps.providers);
|
|
1113
1116
|
});
|
|
1114
1117
|
return () => {
|
|
1115
|
-
return jsx(contextComponent, {
|
|
1118
|
+
return jsx(contextComponent, {
|
|
1119
|
+
children: props.children
|
|
1120
|
+
});
|
|
1116
1121
|
};
|
|
1117
1122
|
}
|
|
1118
1123
|
function jsx(type, props, key) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viewfly/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Viewfly is a simple and easy-to-use JavaScript framework with an intuitive development experience.",
|
|
5
5
|
"main": "./bundles/index.js",
|
|
6
6
|
"module": "./bundles/index.esm.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"bugs": {
|
|
51
51
|
"url": "https://github.com/viewfly/viewfly.git/issues"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "3331fa1b3578475e3e6760bfd5f9f814cc7a171d",
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"reflect-metadata": "^0.2.2"
|
|
56
56
|
}
|