Skip to content

Commit

Permalink
fix parseRoute
Browse files Browse the repository at this point in the history
  • Loading branch information
tsnobip committed Jan 16, 2025
1 parent 31a300e commit c9f333b
Show file tree
Hide file tree
Showing 12 changed files with 393 additions and 27 deletions.
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
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

0 comments on commit c9f333b

Please sign in to comment.