question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use Svelte store for params

See original GitHub issue

@ItalyPaleAle maybe this is a “revolutionary” idea!

@pateketrueke had it here: https://github.com/pateketrueke/yrv/issues/40#issuecomment-612526432.

Basically we could use a Svelte store for params for the current route and avoid to pass params to remove <PageX> was created with unknown prop 'params' warnings at all.

What do you think about?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
frederikhorscommented, Sep 1, 2020

Dear @ItalyPaleAle,

I am really sad for this news. 😢

I was hoping it could be done in version 3. After all semver is just what this is for: to indicate breaking changes!

A lot of people will rush to update the module from 2.x to 3.x, sometimes automatically (how many people put * as version in package.json!).

I think this shouldn’t concern us. We are making here the best router for Svelte 3 now and for years to come!

I hope you can reconsider, really, please.

And I could provide all the help you need for writing a docs explaining the migration from 2 to 3 (although I think the work will be minimal!).

Please reconsider this (perhaps hasty) summer thought. 😄

Fred, a huge fan of yours.

3reactions
ItalyPaleAlecommented, Apr 12, 2020

I get semver and v3.0.0… But I think this needs more discussion. Last week this module had 1,170 downloads, and I need to consider everyone’s needs. Is a warning only at dev time worse than a large breaking change for thousands of apps?

I also think we should at least wait for https://github.com/sveltejs/svelte/issues/4649 and https://github.com/sveltejs/svelte/issues/4652 before making any decision

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding parameters • Svelte Examples
Interactive example Svelte apps.
Read more >
Working with Svelte stores - Learn web development | MDN
Objective: Learn how to use Svelte stores ... the store changes, the callback function will be called with the new value as its...
Read more >
How to make custom methods in svelte store with parameter?
I would recommend using the built-in set method if you can. const currentValue = $myStore; myStore.set('my new value');.
Read more >
How to Use Svelte Stores to Share Data Between Components
Open the file called App.svelte. This file is where you will write the code for your primary component, App . Delete everything inside...
Read more >
Getting Started with Readable & Writable Stores in Svelte
the counter uses an update method that takes a function whose parameter is the current value of the writable store and returns the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found