-
Notifications
You must be signed in to change notification settings - Fork 55
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
Immutable prop warning for various components #124
Comments
Good bug report and a shame that it's not getting any attention. Should encourage people willing to do PRs! |
Issue still persists. These errors also clutter the 'npm run test' results. It took me a while to figure out that I wasn't doing anything as a new Stencil developer. A PR would be much appreciated! |
Facing the same issue! A PR would be much appreciated! |
My assumption is that v2 is on it's way so this gets shelved in favour of that re-write |
@gregorypratt I hope you are right. In the meantime, does anyone know if it's possible to temporarily solve this issue locally and prevent these warnings? It is really cluttering my console while developing. |
I just went into |
Thank you so much @Overthane. This solved the issue for me. I managed to get myself quite lost within the node_modules... |
It seems to be because of the way Stencil State Tunnel shares state values across the hierarchy. They would normally use events (with reserved names) to do that, but I am guessing that would be out of the scope of Stencil, at least in terms of the spirit behind it. That could be the reason why they moved it to the community repo, to separate the concerns: build cross-library components vs building a fully functional app/website. Route stencil-router/packages/router/src/components/route/route.tsx Lines 123 to 128 in 2580a32
Route-Link stencil-router/packages/router/src/components/route-link/route-link.tsx Lines 117 to 121 in 2580a32
Switch stencil-router/packages/router/src/components/switch/switch.tsx Lines 127 to 130 in 2580a32
Redirect stencil-router/packages/router/src/components/redirect/redirect.tsx Lines 32 to 35 in 2580a32
I switched to the History API (1) (2)to handle the routing logic 😅. It feels less like using React or Angular |
An addition to @Overthane's answer: I use cloudflare pages where when I push my code to Github, the server kicks in, does an install, pulls the code and builds everything. Of course, that means that all my changes in node_modules are lost. So based on this StackOverflow answer I do the following:
|
Stencil version: (run
npm list @stencil/core
from a terminal/cmd prompt and paste output below):I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com
Current behavior:
dozens of console warnings for mutable props being changed are output to the console
Expected behavior:
no console warnings
Steps to reproduce:
Other information:
Screenshot:
Commit that introduced the warning: ionic-team/stencil@9c18fa0
I think the fix would be change the code for these props (example) to be mutable, e.g.
I'm happy to submit a PR if that's accurate, but I'm not 100% confident in being able to cover the scope of these changes. Thanks!
The text was updated successfully, but these errors were encountered: