Skip to content
New issue

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

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

Already on GitHub? # to your account

Full rewrite for JSX4, records with optional fields + simplicity #58

Merged
merged 1 commit into from
Mar 21, 2023

Conversation

cknitt
Copy link
Member

@cknitt cknitt commented Feb 7, 2023

This is more or less a full rewrite of the existing bindings that I implemented for our company's projects in the last months.
It is meant for the latest ReScript (10.1.2) + @rescript/react 0.11.0 in JSX4 mode.

It

  • supports JSX4 (exclusively, although just the type definition for screenProps would need to be modified for JSX3)
  • uses records with optional fields instead of @obj creation functions for all options/config/param objects
  • has less runtime (zero cost except for a little glue for the various Navigator.Make functions)
  • is more complete (I went through the props/params for the various navigators in the React Navigation docs and added lots of missing stuff. I am sure that there is still more missing stuff remaining though.)
  • is much simpler to use than the existing bindings. The existing ones are unnecessarily complicated by a params type as an argument to the Make functor - which IMHO is of no use at all and actually incorrect, as not all screens in a stack navigator can be assumed to have the same params shape.

I currently do not have time for documentation or for a comprehensive example, so I am just putting this out there like it is.

@MoOx MoOx merged commit 1837461 into main Mar 21, 2023
@MoOx MoOx deleted the rewrite branch March 21, 2023 16:00
@MoOx
Copy link
Member

MoOx commented Mar 21, 2023

How should we release this ? Any idea for the version number ?

@MoOx MoOx mentioned this pull request Mar 21, 2023
@Freddy03h
Copy link
Member

Freddy03h commented Mar 24, 2023

It seems there is a coming 7.0 version of react-navigation, maybe we could wait for the others breaking changes.

react-navigation/react-navigation@ad722b8

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

Successfully merging this pull request may close these issues.

3 participants