My learning diary

react-hook-form validations

Feeling a little abashed about leaving a bug unresolved for the day, but I want a break and keep the team posted. And I also want to share what I have learnt. However, if you know what’s the problem with my commit, please do not hesitate to reach out! Back to the main learning point I am trying to share: In the pull request above, look at the first screenshot. The first screenshot was supposed to depict a form field that has gone through the validation function despite being untouched.

Continue reading "react-hook-form validations"

Reuse Stories When Testing

My volunteering experience at an open source project led me to appreciate Storybook. Developing frontend components in isolation makes me happy. Unexpected behaviour is localised, and you are appropriately enticed to write your components better. By better, I meant modular. Modularity encourages simplicity (think SRP), and this makes code more reusable and self-documenting. There’s no greater joy than not having to explain your code. But wait, there’s more: If you think writing stories is exclusive to your Storybook instance and thus a pain to write, think again.

Continue reading "Reuse Stories When Testing"


It’s been a while since I last had the chance to assess several libraries to solve parts of a problem. My most recent project required me to evaluate JavaScript libraries which make form management a breeze. The “me” in the past would have jumped at any first possibility, like how a chick imprints on the first living thing they see. Not anymore. My ex-company taught me to set up decision tables and make recommendations according to concrete criteria and their priorities.

Continue reading "react-hook-form"

Core React Training Day 2

Day 2 was a continuation of our understanding of the useEffect hook. Some of concepts mentioned were concepts I “felt” while getting my hands dirty. The workshop was a conducive environment to make these concepts known to me more. Some keywords, libraries or links of interest: usehooks-ts eslint-plugin-react-hooks React lifecycle diagrams The dependency array in useEffect does diffs by identity. For primitives, we diff by value. For objects, we diff by memory location.

Continue reading "Core React Training Day 2"

Core React Training Day 1

I am thankful to be able to attend a React training workshop organised by my company. I have been using React in my job but this workshop made me realise I still have lots to learn. The exercises were very manageable. I learnt the most from the instructor’s detailed explanation of how React works: Babel is not part of React but it was helpful to know how Babel makes our lives easier by parsing JSX.

Continue reading "Core React Training Day 1"