Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use URLSearchParams to decode and encode query params #183

Merged
merged 3 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/fresh-shrimps-scream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@rescript-relay-router-example/client-rendering": patch
"rescript-relay-router": patch
---

fix parseRoute for routes with only query params or only path params
5 changes: 5 additions & 0 deletions .changeset/good-scissors-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"rescript-relay-router": minor
---

use URLSearchParams to decode and encode query params
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
let renderer = Route__Root__Home_route.makeRenderer(
~prepare=({environment}) => {
LayoutQuery_graphql.load(~environment, ~variables=(), ~fetchPolicy=StoreOrNetwork)
},
~render=props => {
<Layout queryRef=props.prepared> {props.childRoutes} </Layout>
},
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
let renderer = Route__Root__PathParamsOnly_route.makeRenderer(
~prepare=({environment}) => {
LayoutQuery_graphql.load(~environment, ~variables=(), ~fetchPolicy=StoreOrNetwork)
},
~render=props => {
<Layout queryRef=props.prepared> {props.childRoutes} </Layout>
},
)

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions examples/client-rendering/src/routes/__generated__/Routes.res

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading