Closed magjckang closed 5 years ago
Hi @magjckang, just impressed that the whole app is implemented by Hooks.
Would you like to answers the question:
Why Hooks? (Usually, to most of our project, we got the requirements changed frequently, could Hooks help on the maintainability?)
@flyingant I think the React team would definitely do a better advertising than me.
The drawbacks, if any, have to be:
Class
es. It only improve reading experience.@magjckang Interesting implementation of the test! Just curious: why did you choose to implement a raw node js server with http.createServer
rather than use a framework for the backend? Also, if you're not using eslint, are you using any other style guide or formatters in this repo?
@johncalvinroberts I've got very limited experience on backend development and before this project Express
and Koa
are the only frameworks I'm familiar with. I think this small framework is quite sufficient to replace them in this scenario and I'm doing so to better demonstrate what I know about Node.js itself.
While in a real world project different concerns should be considered which may lead to a choice such as Loopback or Seneca.
I'm using Prettier as code style formatter and being too lazy to add it as a precommit hook. I'm aware this is not enough and in fact there already are some unused variables in the code.
Although I really think ESLint causes more troubles than it actually helps to resolve, I may have to use it anyway, maybe with a sane config.
@johncalvinroberts And of course the test! Thanks to the ES6 tagged template literal syntax and Jest's "Inline Snapshot". And thanks to this test project too because I didn't even actually know how to write tests before.
@johncalvinroberts Suddenly realized "Interesting implementation of the test!" actually means the test project not the Jest tests... right? Sorry for misunderstanding your words.
Thanks, everyone. That should be enough for us to take a decision. Closing.
Comments are welcomed.