Coder Social home page Coder Social logo

Comments (3)

jakobrosenberg avatar jakobrosenberg commented on September 1, 2024

Hi @foxkdev

This is by design. When you reset, you clear everything before the reset and the reset component becomes the root component. Since the respective component [channel] doesn't exist after the reset, it won't provide the parameter to the route.

It's possible that we can create a solution for this, but it has to work with

  • render
  • load
  • parameters

For instance, if you have a site that's protected by the load function, you might want to reset (disable) the root load at /tenants and at /tenants/[id]/ you want to reset the view, but in both case you want to access the parameters from the entire URL.

Currently the route fragments (components) before the reset component are simply removed before the route is processed. This doesn't allow for much flexibility, but we could instead tag the fragments like this:

// pseudo route fragment
{
  node: RNode,
  params: {},
  shouldLoad: true, // new prop
  shouldRender: true, // new prop
  shouldProvideParams: true // new prop
}

I can't tell if this is straight forward yet, but I'll have a look.

from routify.

foxkdev avatar foxkdev commented on September 1, 2024

I think for better usage when im reset is becase I want reset module(layout), not params.

for example i have this routes:

- [channel]/profile.svelte
- [channel]/iframe.svelte
- _module.svelte
- _module-full.svelte

view /[channel]/profile use module but [channel]/iframe i want use module-full, so in this view im reset, but im need access to params.

I think this is normal usage, I suggest:

have meta param reset to reset all(module and params) and create new param "module"(by default 'module') to assign module custom but with rest of params.

from routify.

jakobrosenberg avatar jakobrosenberg commented on September 1, 2024

🎉 This issue has been resolved in version 3.0.0-next.157 🎉

The release is available on:

Your semantic-release bot 📦🚀

from routify.

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.