rescript-react-native / rescript-react-navigation

ReScript bindings for React Navigation
MIT License
74 stars 28 forks source link

chore: migrate to rescript #44

Closed cem2ran closed 3 years ago

cem2ran commented 3 years ago

Spent a few minutes migrating this. Used rescript convert src/**/*.re. This converted everything except class types as mentioned in #42. I've converted the classes to the new object spread syntax.

Haven't tested whether this works, as I currently don't use this at work, maybe someone else can test this draft PR and bring it to the finish line.

scripts in Package.json should probably be updated further, e.g. format.

Freddy03h commented 3 years ago

Hi! I finally had time to migrate my app to latest rescript dependencies and test this PR on a real project.

It work well thank you 😊

The only missing part that I think it's still useful are the @obj options functions in Navigators (bottomaTabBarOptions()in BottomTabs, materialTopTabBarOptions() in MaterialTopTabs, …) because it's not yet possible to create Object without specifying option('a) attributes.

MoOx commented 3 years ago

Thanks for this PR. I tried conversion a few months ago, but virtual class where being dropped entirely... It seems here there is something to cover this.

@Freddy03h if you have time, we can merge this in a wip branch & you can continue contributing from here. Sounds good to you ?

MoOx commented 3 years ago

@Freddy03h up to continue the migration? or @cem2ran do you have time for this?