useUrlParams()
What we would like:
so the above should result in something like http://localhost/?count=123
useUrlParams()
implementationThe above is the basic idea. However, the above has an issue, that it will always return a new instance of the params
, where as we should have a way to return the same instance no matter how many times it is invoked.
For that reason we should have a way to scope the useStore()
The proposal is to add additional parameter to the useStore
which will ensure that the value it returns is scoped to the container. This in effect makes the params
a singleton within the application.
The above is not ideal, because the same issue applies to all of the use method.
useWith()
Having useWith
would allow to re-scope the location of the binding code. Namely to a different element or to the container
.