URLFormJS
sveltekit-search-params
URLFormJS | sveltekit-search-params | |
---|---|---|
4 | 3 | |
21 | 422 | |
- | - | |
5.9 | 8.1 | |
10 months ago | about 1 month ago | |
JavaScript | TypeScript | |
BSD 3-clause "New" or "Revised" License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
URLFormJS
-
Show HN: Non.io, a Reddit-like platform Ive been working on for the last 4 years
I'm concerned about the `#` character in the URL.
# means fragment and that's kept local and not sent to the server unless client side Javascript sends it to the server. I would use an identifier that doesn't already mean something to the URL.
See https://github.com/Cyphrme/URLFormJS#query-parameters-fragme... (Also see https://github.com/Cyphrme/Path)
For an example where this is relevant: https://cyphr.me/ed25519_tool/ed.html#?msg_encoding=Text&msg...
And see https://www.rfc-editor.org/rfc/rfc3986#section-3.5
- URLFormJS: Create sticky forms, stateful applications, shareable links
-
How to store your app's entire state in the url
I wrote a library for storing application state in the URL. Its novel feature is using fragment query, which prevents the information from being sent to the server.
https://github.com/Cyphrme/URLFormJS
I would love to see it get more use.
Here's a small demo: https://cyphrme.github.io/URLFormJS/#?first_name=Bob&last_na...
See my other comment on this page for some other examples of its use.
sveltekit-search-params
-
How did you accomplish complex search and filter with query params?
I saw paoloricciuti/sveltekit-search-params posted somewhere, I haven't used it but it looks very good.
-
How to store your app's entire state in the url
This is quickly becoming a standard in apps and it really shouldnt be handrolled since its such a common requirement and easy to get wrong (between serializing/deserializing/unsetting states). In Svelte it is now as easy as using a store: https://github.com/paoloricciuti/sveltekit-search-params
in general i've been forming a thesis that there is a webapp hierarchy of state that goes something like:
1. component state (ephemeral, lasts component lifecycle)
2. temp app state (in-memory, lasts the session)
3. durable app state (persistent, whether localstorage or indexeddb or whatever)
4. sharable app state (url)
5. remote user data (private)
6. team user data (shared)
7. global data (public)
and CRUD for all these states should be as easy to step down/up as much as possible with minimal api changes as possible (probably a hard boundary between 4/5 for authz). this makes feature development go a lot faster as you lower the cost of figuring out the right level of abstraction for a feature
-
Is there anyway to change the URL in an endpoint?
I think this library is a potential use case for you https://github.com/paoloricciuti/sveltekit-search-params
What are some alternatives?
Path - A more robust URI naming scheme
u - μ is a JavaScript library for encoding/decoding state (JavaScript object) in URL
calculang - calculang is a language for calculations 🧮💬👩💻
t
nonio
pastml
xstate - Actor-based state management & orchestration for complex app logic.
urltron - Stringify and parse json as url query paramaters
ipfs - IPFS implementation in JavaScript
houdini - The disappearing GraphQL client