-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
get rid of Obj.magic in doLoadRouteRenderer
also made unsafe_toPrepareProps safer removed unsafe makeRenderer
- Loading branch information
Showing
22 changed files
with
235 additions
and
331 deletions.
There are no files selected for viewing
8 changes: 4 additions & 4 deletions
8
examples/client-rendering/src/routes/Root__Todos__ByStatus_route_renderer.res
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
let renderer = Routes.Root.Todos.ByStatus.Route.makeRenderer( | ||
~prepare=_props => { | ||
let renderer: Routes.Root.Todos.ByStatus.Route.routeRenderer<'prepared> = { | ||
prepare: _props => { | ||
() | ||
}, | ||
~render=_props => { | ||
render: _props => { | ||
React.null | ||
}, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
examples/client-rendering/src/routes/Root__Todos_route_renderer.res
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
let renderer = Route__Root__Todos_route.makeRenderer( | ||
~prepare=({environment}) => { | ||
let renderer: Route__Root__Todos_route.routeRenderer<'prepared> = { | ||
prepare: ({environment}) => { | ||
TodosListQuery_graphql.load(~environment, ~fetchPolicy=StoreOrNetwork, ~variables=()) | ||
}, | ||
~render=({prepared, childRoutes}) => { | ||
render: ({prepared, childRoutes}) => { | ||
<TodosList queryRef=prepared> {childRoutes} </TodosList> | ||
}, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
let renderer = Route__Root_route.makeRenderer( | ||
~prepare=({environment}) => { | ||
let renderer: Routes.Root.Route.routeRenderer<'prepared> = { | ||
prepare: ({environment}) => { | ||
LayoutQuery_graphql.load(~environment, ~variables=(), ~fetchPolicy=StoreOrNetwork) | ||
}, | ||
~render=props => { | ||
render: props => { | ||
<Layout queryRef=props.prepared> {props.childRoutes} </Layout> | ||
}, | ||
) | ||
} |
30 changes: 20 additions & 10 deletions
30
examples/client-rendering/src/routes/__generated__/RouteDeclarations.res
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
31 changes: 7 additions & 24 deletions
31
examples/client-rendering/src/routes/__generated__/Route__Root__Todos__ByStatus_route.res
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
32 changes: 7 additions & 25 deletions
32
examples/client-rendering/src/routes/__generated__/Route__Root__Todos__Single_route.res
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
30 changes: 7 additions & 23 deletions
30
examples/client-rendering/src/routes/__generated__/Route__Root__Todos_route.res
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.