Realworld: ReasonReact (ReasonML)

Created on 7 Apr 2018  ยท  24Comments  ยท  Source: gothinkster/realworld

Progress

  • [x] ๐Ÿ Fork the starter repo & post the link in this
  • [x] ๐ŸŽจ Create logo for repo & update issue status
  • [x] ๐Ÿ”จ Implement all of Conduit's functionality per the spec & API
  • [ ] ๐Ÿ‘€ Move repo to main org & Peer review final codebase by admins/community (RFC)
  • [ ] ๐ŸŽ‰ Tag v1 release and officially list it on the README!

Current Status

Codebase (done):
https://github.com/jihchi/reason-react-realworld-example-app

frontend wip

Most helpful comment

Hi @forrest-akin ,

Currently, I'm working on upgrading re-formality to latest version.
My goal is migrating codebase to use React Hooks.
You can see it at this branch, It's still a work in progress.


_2020/5/21 edit_:

The codebase has been updated and it is now based on React Hooks.

It is using latest version of React and BuckleScript.

All 24 comments

Excited to see this @jihchi! I've been hearing a lot about ReasonML lately.

New logo: logo

Hi @Cameron-C-Chapman , The codebase is done.

@jihchi awesome! Do you think you could fill out README sections on How it works, getting started etc? Also, would be great if there was a hosted demo we could look at?

Cheers!

@anishkny Wow, thank you for so fast response.

I'm working README, unit test and hosted demo.
I'll update here when its done.

@anishkny I've completed README, minimum unit test and hosted demo.

Great. Played around a little bit and looks good. For some reason I am seeing different fonts compared to the React/Redux Demo, but rest seems awesome.

@Cameron-C-Chapman @EricSimons PTAL!

@anishkny I forgot to delete unused CSS. Its back to normal. Thank you.

I haven't found #136 before (tried search but didn't see it).

Looks good to me too! Nice work @jihchi!

I didn't realize there was 2 ReasonML implementations in progress. Looking at the issues it looks like it was complete awhile ago also. ๐Ÿ˜ฌ

@jihchi you mind taking a look and seeing if there is anything different between the 2 repos approaches? We should probably add them both to the README so it would be nice if there was some difference (version, architecture), etc that we could differentiate the 2 somehow.

It also looks like that repo is already merged into the gothinkster org, it just never got listed on the readme.

@Cameron-C-Chapman

There are some different between tech stack:

Tool | gothinkster/reasonml-realworld-example-app | jihchi/reason-react-realworld-example-app
---|---|---
Version of ReasonReact | ^0.2.4 | ^0.4.1
Version of BuckleScript | 2.0 | 3.0
JS Bundler / Dev-server | Custom Webpack config | react-scripts@next
Client-side Routing |bs-director | ReasonReact built-in router
Testing |bs-jest | bs-jest + Enzyme
Form & Validation | Custom | re-formality
Storage of authorization token | LocalStorage | Cookie

I think gothinkster/reasonml-realworld-example-app is a little of out-dated.

Pinged the ReasonML Discord to get a review!

I tried cloning and running the repo, exactly as described in the readme - I'm getting a lot of CRA linting warnings on the generated JS.

e.g.

<snip>
[ReasonML] >>>> Finish compiling
[CRA] Failed to compile.
[CRA]
[CRA] ./src/Profile.bs.js
[CRA] Compiling...
[CRA] Compiled with warnings.
[CRA]
[CRA] ./src/API.bs.js
[CRA] /d/repo/reason-react-realworld-example-app/src/API.bs.js
[CRA]   2:1  warning  'use strict' is unnecessary inside of modules  strict
[CRA]
[CRA] โœ– 1 problem (0 errors, 1 warning)
[CRA]   0 errors, 1 warning potentially fixable with the `--fix` option.
[CRA]
[CRA]
[CRA] ./src/App.bs.js
[CRA] /d/repo/reason-react-realworld-example-app/src/App.bs.js
<snip>

@Madsn

Yes, It works as expected. It's just warning, you still could start & build the project.

I know it still builds, but why not prevent linting of the generated .bs.js files? Add an eslintignore perhaps?

@Madsn

eslintignore won't works. see here.

@jihchi that just makes me sad :(. I don't get why CRA doesn't support eslint customization.

A bucklescript hook to add eslint ignore comment to the top of the file might remove the linting errors, depending on if the hook is run before or after the file is actually saved to disk and then caught by the linter.

Not ideal for sure, would be a bit of a performance hit, but might be less of a performance cost than linting the generated files.

https://bucklescript.github.io/docs/en/build-configuration.html#js-post-build

@Madsn Thanks! I'll take a look at it!

Works only partially.

I cloned, built and ran it. Ok.
I tried signing up and got the following error messages displayed.

  • Username can't be blank
  • Email can't be blank
  • Password can't be blank

They weren't blank.

@jpeg729 I'll take a look later. Thanks for your report.

@jpeg729 I've fixed and deployed. thanks for your feedback.

Hi, just checking in. The project looks like it's more or less ready to merge, but there hasn't been any activity here in awhile. What are the next steps? Thanks!

Hi @forrest-akin ,

Currently, I'm working on upgrading re-formality to latest version.
My goal is migrating codebase to use React Hooks.
You can see it at this branch, It's still a work in progress.


_2020/5/21 edit_:

The codebase has been updated and it is now based on React Hooks.

It is using latest version of React and BuckleScript.

Is it relevant?
I don't see the app in the list on the main page.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

EricSimons picture EricSimons  ยท  7Comments

vladfaust picture vladfaust  ยท  5Comments

EricSimons picture EricSimons  ยท  3Comments

humboldtux picture humboldtux  ยท  6Comments

marcosfede picture marcosfede  ยท  6Comments