Comments (9)
@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 node_modules/@stencil/router/collection/components/
and changed mutable: false
to mutable: true
for the appropriate Props, in the appropriate components.
from stencil-router.
Good bug report and a shame that it's not getting any attention. Should encourage people willing to do PRs!
from stencil-router.
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!
from stencil-router.
Facing the same issue! A PR would be much appreciated!
from stencil-router.
My assumption is that v2 is on it's way so this gets shelved in favour of that re-write
from stencil-router.
@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.
from stencil-router.
Thank you so much @Overthane. This solved the issue for me. I managed to get myself quite lost within the node_modules...
from stencil-router.
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
from stencil-router.
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:
- Make the changes as suggested by @Overthane
- Run
npm install patch-package --save-dev
- run
npx patch-package @stencil/router
- check in to git the patch file created in the <my-project>/patches directory
- Add the line
"postinstall": "npx patch-package"
to the script section of package.json
from stencil-router.
Related Issues (20)
- Route transitons
- Can't style anchor link when used in shadow false, but scoped true HOT 1
- Incorrect match when multiple urlMatch attributes are defined as regular expressions
- Routing to same page with dynamic params HOT 2
- `stencil-route-redirect` named `stencil-router-redirect`
- [v2] Handle links clicks without calling href()
- Release v2 in this repo HOT 1
- test1
- test2
- test3
- test4
- App with stencil-router doesn't compile in Stencil 2.14+ because of TypeScript 4.5 HOT 5
- Bug: @Prop <prop_name> on <>is immutable on <stencil_router_component>
- Bug: Path parameter values will be converted to lowercase
- Stencil routes not working on deploy folder HOT 1
- Navigation: Improve .push() and introduce .replace() method
- Readme & Wiki incorrect HOT 5
- Package Update HOT 1
- Module '"@stencil-community/router"' has no exported member 'createRouter'. HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stencil-router.