Closed ebg1223 closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated |
---|---|---|---|---|
solito | ✅ Ready (Inspect) | Visit Preview | 💬 Add your feedback | Feb 10, 2023 at 6:35AM (UTC) |
solito-app | ✅ Ready (Inspect) | Visit Preview | 💬 Add your feedback | Feb 10, 2023 at 6:35AM (UTC) |
solito-s9oj | ✅ Ready (Inspect) | Visit Preview | Feb 10, 2023 at 6:35AM (UTC) | |
with-custom-fonts | ✅ Ready (Inspect) | Visit Preview | 💬 Add your feedback | Feb 10, 2023 at 6:35AM (UTC) |
If this is a welcome addition, I would be happy to append docs with a small update and push a new commit to this branch before merging. Thanks again for all your contributions to this community. Huge fan of your work @nandorojo
Interesting idea. I'll look into this more closely soon!
@ebg1223 is attempting to deploy a commit to the Beatgig Team on Vercel.
A member of the Team first needs to authorize it.
@nandorojo Any thoughts on this? Would love to have it in master!
I'll probably have to re-implement this with a separate API, but the idea is there.
This is now live in 2.3.0
: https://github.com/nandorojo/solito/releases/tag/v2.3.0
Hello! Huge fan of this lib/project. Needed a way to override useParam push vs replace route.
Current behavior is to push if param is not currently defined, otherwise replace.
If using url as state, then for optionally nullable state elements, this may not be desirable(ex. form select), where user may set their selection, unset their selection, and then set a new selection. This would create 3 route pushes, but logically to user, back button should take them to previous page. In this case, we should always replace, even if param value is null(effectively removing param).
Alternatively, if the state param controls a significant aspect of the page, user may expect back button to take them back to previous param value. In this case, we should always push(even if param exists).
If no value for routeChangeMethod is provided, then default behavior is current behavior.
This only applies to nextjs as native useParam functions essentially as normal state.