-
-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested Components not updating the child component #685
Conversation
Nested Components not updating the child component
Error: Error while trying to collect info after merging patch-2 into develop. Error: Command failed: yarn setup lerna notice cli v6.6.2 lerna info ci enabled lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-aurelia/node_modules lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-blazor/node_modules lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-cycle/node_modules lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-elm/node_modules lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-ember/node_modules lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-hyperapp/node_modules lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-inferno/node_modules lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-litel/node_modules lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-million/node_modules lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-mithril/node_modules lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-ng/node_modules lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-ngjs/node_modules lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-preact/node_modules lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-react-15/node_modules lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-react/node_modules lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-riot/node_modules lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-solid/node_modules lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-svelte/node_modules lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-vue-3/node_modules lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-vue/node_modules lerna info clean removing /home/runner/work/piral/piral/src/framework/piral-base/node_modules lerna info clean removing /home/runner/work/piral/piral/src/framework/piral-core/node_modules lerna info clean removing /home/runner/work/piral/piral/src/framework/piral/node_modules lerna info clean removing /home/runner/work/piral/piral/src/framework/siteless/node_modules lerna info clean removing /home/runner/work/piral/piral/src/initializers/create-pilet/node_modules lerna info clean removing /home/runner/work/piral/piral/src/initializers/create-piral-instance/node_modules lerna info clean removing /home/runner/work/piral/piral/src/pages/docs/node_modules lerna info clean removing /home/runner/work/piral/piral/src/pages/www/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-adal/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-auth/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-axios/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-breadcrumbs/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-configs/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-containers/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-dashboard/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-ext/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-feeds/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-fetch/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-forms/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-lazy/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-menu/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-modals/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-notifications/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-oauth2/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-oidc/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-page-layouts/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-redux/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-search/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-tracker/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-tracking/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-translate/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-update/node_modules lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-urql/node_modules lerna info clean removing /home/runner/work/piral/piral/src/samples/empty-piral/node_modules lerna info clean removing /home/runner/work/piral/piral/src/samples/minimal-piral/node_modules lerna info clean removing /home/runner/work/piral/piral/src/samples/sample-cross-fx/node_modules lerna info clean removing /home/runner/work/piral/piral/src/samples/sample-piral-core/node_modules lerna info clean removing /home/runner/work/piral/piral/src/samples/sample-piral/node_modules lerna info clean removing /home/runner/work/piral/piral/src/tooling/piral-cli-webpack5/node_modules lerna info clean removing /home/runner/work/piral/piral/src/tooling/piral-cli/node_modules lerna info clean removing /home/runner/work/piral/piral/src/tooling/publish-microfrontend/node_modules lerna info clean removing /home/runner/work/piral/piral/src/utilities/piral-debug-utils/node_modules lerna info clean removing /home/runner/work/piral/piral/src/utilities/piral-hooks-utils/node_modules lerna success clean finished lerna notice cli v6.6.2 lerna info ci enabled lerna info bootstrap root only warning Resolution field "ws@7.4.6" is incompatible with requested version "ws@^8.11.0" warning Resolution field "node-fetch@2.6.7" is incompatible with requested version "node-fetch@2.6.1" warning Resolution field "ssri@8.0.1" is incompatible with requested version "ssri@9.0.1" warning Resolution field "ssri@8.0.1" is incompatible with requested version "ssri@9.0.1" warning Resolution field "ssri@8.0.1" is incompatible with requested version "ssri@^10.0.1" warning Resolution field "ssri@8.0.1" is incompatible with requested version "ssri@^10.0.1" warning Resolution field "ssri@8.0.1" is incompatible with requested version "ssri@^10.0.0" warning Resolution field "ssri@8.0.1" is incompatible with requested version "ssri@^10.0.0" warning Resolution field "ssri@8.0.1" is incompatible with requested version "ssri@^10.0.0" warning Resolution field "ssri@8.0.1" is incompatible with requested version "ssri@^10.0.0" warning Resolution field "ssri@8.0.1" is incompatible with requested version "ssri@^9.0.0" warning Resolution field "ssri@8.0.1" is incompatible with requested version "ssri@^9.0.0" warning Resolution field "ansi-regex@5.0.1" is incompatible with requested version "ansi-regex@^6.0.1" warning Resolution field "tslib@2.5.2" is incompatible with requested version "tslib@^1.8.0" warning Resolution field "tslib@2.5.2" is incompatible with requested version "tslib@^1.8.1" warning Resolution field "tslib@2.5.2" is incompatible with requested version "tslib@^1.7.1" warning Resolution field "postcss@8.4.31" is incompatible with requested version "postcss@^8.4.38" warning Resolution field "rxjs@7.5.6" is incompatible with requested version "rxjs@^6.4.0" warning Resolution field "rxjs@7.5.6" is incompatible with requested version "rxjs@^6.4.0" warning Resolution field "tslib@2.5.2" is incompatible with requested version "tslib@^1.9.3" warning Resolution field "postcss@8.4.31" is incompatible with requested version "postcss@^7.0.36" warning Resolution field "ansi-regex@5.0.1" is incompatible with requested version "ansi-regex@^4.1.0" warning Resolution field "highlight.js@10.7.1" is incompatible with requested version "highlight.js@^11.3.1" warning Resolution field "node-fetch@2.6.7" is incompatible with requested version "node-fetch@^1.0.1" warning Resolution field "ansi-regex@5.0.1" is incompatible with requested version "ansi-regex@^3.0.0" warning Resolution field "ws@7.4.6" is incompatible with requested version "ws@^8.11.0" warning " > @testing-library/react@14.1.0" has unmet peer dependency "react@^18.0.0". warning " > @testing-library/react@14.1.0" has unmet peer dependency "react-dom@^18.0.0". warning " > piral-ng@1.5.2" has unmet peer dependency "piral-ng-common@*". warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-ng > @angular/compiler-cli@16.2.9" has incorrect peer dependency "typescript@>=4.9.3 <5.2". warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-ng > @angular/core@16.2.9" has unmet peer dependency "zone.js@~0.13.0". warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-react-15 > react-dom-15@15.7.0" has unmet peer dependency "react@^15.7.0". warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-documentation-page > @pidoc/core@0.16.3" has unmet peer dependency "@pidoc/components@*". warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-documentation-page > @pidoc/core@0.16.3" has unmet peer dependency "react@*". warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-documentation-page > @pidoc/core@0.16.3" has unmet peer dependency "react-dom@*". warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-documentation-page > @pidoc/core@0.16.3" has unmet peer dependency "react-router-dom@*". warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > sample-piral > bootstrap@4.6.2" has unmet peer dependency "jquery@1.9.1 - 3". warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > sample-piral > bootstrap@4.6.2" has unmet peer dependency "popper.js@^1.16.1". warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > sample-piral > reactstrap@8.10.1" has unmet peer dependency "react@>=16.3.0". warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > sample-piral > reactstrap@8.10.1" has unmet peer dependency "react-dom@>=16.3.0". warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-ember > ember-source > @babel/plugin-transform-block-scoping@7.23.0" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-ember > ember-source > @babel/plugin-transform-object-assign@7.22.5" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-ember > ember-source > babel-plugin-debug-macros@0.3.4" has unmet peer dependency "@babel/core@^7.0.0". warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-documentation-page > @pidoc/core > @pidoc/components@0.16.3" has unmet peer dependency "react@*". warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-documentation-page > @pidoc/core > @pidoc/components@0.16.3" has unmet peer dependency "react-dom@*". warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-documentation-page > @pidoc/core > @pidoc/components@0.16.3" has unmet peer dependency "react-router-dom@*". warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > sample-piral > reactstrap > react-popper@1.3.11" has unmet peer dependency "react@0.14.x || ^15.0.0 || ^16.0.0 || ^17.0.0". warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > sample-piral > reactstrap > react-transition-group@3.0.0" has unmet peer dependency "react@>=16.6.0". warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > sample-piral > reactstrap > react-transition-group@3.0.0" has unmet peer dependency "react-dom@>=16.6.0". warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > sample-piral > reactstrap > react-popper > @hypnosphi/create-react-context@0.3.1" has unmet peer dependency "react@>=0.14.0". lerna notice cli v6.6.2 lerna info ci enabled error Command failed with exit code 1. error Command failed with exit code 1. lerna ERR! yarn install --mutex network:42424 --non-interactive exited 1 in 'piral' lerna ERR! yarn install --mutex network:42424 --non-interactive exited 1 in 'piral' error Command failed with exit code 1. error Command failed with exit code 1. at ChildProcess.exithandler (node:child_process:422:12) at ChildProcess.emit (node:events:514:28) at maybeClose (node:internal/child_process:1105:16) at ChildProcess._handle.onexit (node:internal/child_process:305:5) Generated by @jsenv/file-size-impact during check-bundle-size#8642525903 on b4e36c1 |
// router added for backwards compatibility | ||
const context = React.useMemo( | ||
() => ({ publicPath: navigation.publicPath, navigation, router: navigation.router }), | ||
[], | ||
); | ||
const innerProps = React.useMemo(() => ({ ...props, ...captured }), [props]); | ||
|
||
React.useEffect(() => () => destroyPortal(id), none); | ||
React.useEffect(() => () => destroyPortal(id), [props.children]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure you want to destroy the portal then? I don't think that makes sense here.
@@ -31,15 +31,15 @@ function wrapForeignComponent<T>( | |||
) { | |||
return React.memo((props: T) => { | |||
const { destroyPortal, navigation } = useGlobalStateContext(); | |||
const id = React.useMemo(() => (portalIdBase++).toString(26), none); | |||
const id = React.useMemo(() => (portalIdBase++).toString(26), [props.children]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see why a change of props.children should have an impact on the id of the portal.
Maybe let's first have a MWE to reproduce the issue and then let's see what the root cause is / how to improve it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The situation is a bit complicated, but it does affect the update of components, resulting in abnormal rendering. I will show you this MWE later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure - thanks for the efforts!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any update on this? 1.5.3 is out and 1.5.4 is in the making.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. It is in processing, I'm using the develop branch to make the MWE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need more time to review the details of my project, so I will close it for now and will reopen it when there is progress. It's most likely not the piral-core
's problem, and sorry for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good - just reopen / open an issue if we have a reproducible or can pin it down to Piral in any way.
Nested Components not updating the child component
New Pull Request
For more information, see the
CONTRIBUTING
guide.Prerequisites
Please make sure you can check the following boxes:
Type(s) of Changes
Contribution Type
What types of changes does your code introduce? Put an
x
in all the boxes that apply:Description
[Place a meaningful description here]
Remarks
[Optionally place any follow-up comments, remarks, observations, or notes here for future reference]