gothinkster / realworld

"The mother of all demo apps" β€” Exemplary fullstack Medium.com clone powered by React, Angular, Node, Django, and many more

Home Page:https://main--realworld-docs.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ReasonReact (ReasonML)

jihchi opened this issue Β· comments

Progress

  • 🏁 Fork the starter repo & post the link in this
  • 🎨 Create logo for repo & update issue status
  • πŸ”¨ 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

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.

Hello we are currently moving all work in progress to Github Discussions.
I'll close this issue by now, you can find instruction to open a discussion there : #633

Thanks for your contribution !