Skip to content

Commit

Permalink
fix loadFn not a function (#141)
Browse files Browse the repository at this point in the history
* fix loadFn not a function

* update changeset
  • Loading branch information
tsnobip authored Sep 13, 2023
1 parent 984810e commit 26d29f8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/famous-fishes-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"rescript-relay-router": patch
---

Fix the type of the generated loadFn in loadRouteRenderer

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.

Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ let rec getRouteDefinition = (route: printableRoute, ~indentation): string => {

let str = `{
let routeName = "${routeName}"
let loadRouteRenderer = () => Js.import(${routeName}_route_renderer.renderer)->Obj.magic->doLoadRouteRenderer(~routeName, ~loadedRouteRenderers)
let loadRouteRenderer = () => (() => Js.import(${routeName}_route_renderer.renderer))->Obj.magic->doLoadRouteRenderer(~routeName, ~loadedRouteRenderers)
let makePrepareProps = ${route->getMakePrepareProps(~returnMode=ForInlinedRouteFn)}
{
Expand Down

0 comments on commit 26d29f8

Please sign in to comment.