Giter Site home page Giter Site logo

Comments (9)

Overthane avatar Overthane commented on May 24, 2024 7

@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.

fohlin avatar fohlin commented on May 24, 2024

Good bug report and a shame that it's not getting any attention. Should encourage people willing to do PRs!

from stencil-router.

MrGowdy avatar MrGowdy commented on May 24, 2024

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.

ssurabhi10 avatar ssurabhi10 commented on May 24, 2024

Facing the same issue! A PR would be much appreciated!

from stencil-router.

gregorypratt avatar gregorypratt commented on May 24, 2024

My assumption is that v2 is on it's way so this gets shelved in favour of that re-write

from stencil-router.

MrGowdy avatar MrGowdy commented on May 24, 2024

@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.

MrGowdy avatar MrGowdy commented on May 24, 2024

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.

bleuscyther avatar bleuscyther commented on May 24, 2024

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

ActiveRouter.injectProps(Route, [
'location',
'history',
'historyType',
'routeViewsUpdated'
]);

Route-Link

ActiveRouter.injectProps(RouteLink, [
'history',
'location',
'root'
]);

Switch

ActiveRouter.injectProps(RouteSwitch, [
'location',
'routeViewsUpdated'
]);

Redirect

ActiveRouter.injectProps(Redirect, [
'history',
'root'
]);

I switched to the History API (1) (2)to handle the routing logic 😅. It feels less like using React or Angular

from stencil-router.

safaalai avatar safaalai commented on May 24, 2024

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:

  1. Make the changes as suggested by @Overthane
  2. Run npm install patch-package --save-dev
  3. run npx patch-package @stencil/router
  4. check in to git the patch file created in the <my-project>/patches directory
  5. Add the line "postinstall": "npx patch-package" to the script section of package.json

from stencil-router.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.