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:
- Created 3 years ago
- Reactions:4
- Comments:7 (7 by maintainers)
Top Results From Across the Web
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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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!
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.
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