Comments (3)
Hi, thank you for using the library and sharing with me your concern!
First, you can open the Flow.drawio
file with diagrams.net - Draw.io, to see when we assigning the default values into the returned object.
I don't remember exactly the decisions I made. Let's think.
- How do you expect me to support that? By adding an
options
object to enable showing the default values? - What about you will not configure a default value, and instead, you will add a
useEffect
to set the value when the component is mounted? (I'm asking to understand the use-case).
from use-route-as-state.
- I expected it to be the default behaviour.
- Yes you're right, a simple useEffect is enough for my use-case, I hoped there was a better way to do it.
Thanks for having taken the time to look at this issue.
(I'm leaving the issue open, but don't hesitate to close if you want)
from use-route-as-state.
OK then, thanks @louis-sanna-eki for your suggestion. I understand it, but I chose to take the another approach, which is also logical, so I will not change it for now.
Thanks again, and feel free to open other issues!
from use-route-as-state.
Related Issues (18)
- Default values without change the route
- Add support for clear rest of params
- Set all defaults explicitly before the updated param
- '%' in URL leads to exception HOT 3
- What are the breaking changes of version 3? HOT 6
- Setting both query string key and route params in one render/effect does not work. HOT 5
- Add support for repeating query params (arrays) HOT 14
- The automated release is failing 🚨
- Can re-render be made independent, so that multiple hook calls re-render only the affected param? HOT 7
- Create a release branch
- ChainAlert: Dependency "libnpmexec" version 3.0.2 has no matching tag in its git repo
- ChainAlert: Dependency "libnpmfund" version 2.0.2 has no matching tag in its git repo
- ChainAlert: Dependency "libnpmorg" version 3.0.0 has no matching tag in its git repo
- ChainAlert: Dependency "libnpmpublish" version 5.0.0 has no matching tag in its git repo
- Can't use with npm 8 and react 17 HOT 2
- ChainAlert: Dependency "lru-cache" version 7.4.0 has new "prepare" script
- react-router-dom v6 support? HOT 18
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 use-route-as-state.