Skip to content

Conversation

drewschrauf
Copy link
Contributor

This is a follow-up to #20

It addresses a few of the points raised there but a couple of the solutions are controversial so I'm raising it as a separate PR. In particular:

  • It doesn't try and solve the loader/action type safety, opting to instead treat everything as Js.Json.t
  • It uses decco to make dealing with Js.Json.t easier
  • It uses another patch-package diff to allow the user to customise the server-only component regex
  • It has a few partially-implemented Remix bindings

I'm keen to see if you think this is moving in the correct direction or if some of these changes are just too naughty.

Comment on lines +217 to +224
type loaderFunction = dataFunctionArgs => Js.Promise.t<Webapi.Fetch.Response.t>

type actionFunction = dataFunctionArgs => Js.Promise.t<Webapi.Fetch.Response.t>

type catchBoundaryComponent = unit => React.element

type errorBoundaryComponentProps = {error: Js.Exn.t}
type errorBoundaryComponent = errorBoundaryComponentProps => React.element

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the binding I want and I wonder when this PR will be reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants