Comments (1)
I think it's general behavior for all svelte stores contained an object/array. if you meet this too often, I think make sense to write some kind of helper function for a more convenient usage:
function delProp(store, prop) {
store.update($store => {
delete $store[prop];
return $store;
});
}
or you can wrap query store
to your own and extend its functionality:
export const myQuery = {
...query,
del(param) {
this.update(($query) => {
delete $query.params[param];
return $query;
});
}
};
...
myQuery.del('x');
Basically, svelte-pathfinder
doesn't provide any additional API for svelte standard stores. Hope it would help.
from svelte-pathfinder.
Related Issues (13)
- goto('/app') returns Uncaught TypeError: Failed to construct 'URL': Invalid URL HOT 2
- Equals sign from the query filter is dropped HOT 3
- Duplicate message in browser history when reload page HOT 1
- Redirect & browser history navbutton HOT 1
- SSR support examples HOT 1
- Avoid empty query values HOT 6
- Possible to preserve paths on page refresh? HOT 2
- Why page reloads? HOT 5
- Nested routes HOT 14
- $query store prototype HOT 2
- Linking to path with query parameter triggers two history changes HOT 1
- goto("/") throws Failed to construct 'URL': Invalid URL
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 svelte-pathfinder.