<Hi/>I am Max,Frontend developer

About:

I am based in Singapore, have a project you'd like to discuss?

My Experience:

ReasonML ReasonReact updated with React hooks

With the latest ReasonReact update, finally support hooks, and new way of writing reasonReact with more functional approach is so much better, easier and fun. Lets try to begin with a new Component, Button.re, BTW, there are some API was replaced to new name space “React” from “ReasonReact”

As you can see above code, […]

Read more

Higher order component for ReasonReact

A higher order component is basically a reusable component which allows you to takes in another component and return a new component. To recap about higher component check our my older post here In ReasoML higher order function are called “Functors” which takes in a module type and returns a module type, functors are written […]

Read more

Better way to decode JSON in ReasonML/ReasonReact

Recently I was working on some reasonml/ReasonReact project which required to request data in JSON format from an API endpoint, well there are some BuckleScript decoders such https://github.com/glennsl/bs-json which is the more popular one,the way you decode is pretty easy:

you pass in the json and define the field in Json.Decode… at first it […]

Read more

fast piping in reasonml

fast piping allow you to transform your function code into more readable syntax, imaging you have human(person(age())) this is very inconvenience to see. with piping you can do it like this:

which is exactly the same as human(person(age())) there are 3 different pipes as I understand you can do like

or

whats different […]

Read more

Convert React project to ReasonReact project

Recently I converted one of my old React project while studying React from Udacity sometime back, Since I am reading ReasonML recently so I thought I might as well convert to ReasonML language or ReasonReact, you can find it here. MyRead ReasonReact

Read more

optional chaining in javascript

Imaging if you need to access deep level of property and you are not sure that if such properties exists deep down, you are doing something like

This is really difficult to read and understand sometime. there is something called optional chaining in javascript proposal which you can use if you include in babel-plugin-proposal-optional-chaining […]

Read more

ReasonML 101 notes

Reason 101: variable assignment with let keyword cannot is immutable, but you can set it to mutable by assign to ref() example JS:

in reason:

for string concat:

array in ReasonML is using [|”a”, “b”, “c”|] /* | = pipe symbol */

and

list is immutable. in list you can […]

Read more

Using react higher order component

When you start to work with lots of React components, and you realised alot of component patterns are the same, then you want to reuse these component patterns which is where Higher Order Component(HOC) kicks in. Think of HOC as higher order function: usually you write function in Javascript:

Higher order function basically is […]

Read more

React js 16.3

Recently Facebook has released the react 16.3 which bundled with a few awesome features including Context API and createRef(), I will talk abit about Context API since its quite hot topic. Context API its a feature that allows you to pass your data down to all child levels without passing props around like what you […]

Read more

Whats wrong with lambda internal server error

Lambda was a great service with great features, and serverless framework is even better, serverless simplified everything you do with AWS or other serverless providers. Was doing some fun with serverless framework where I am simply trying to output a response from some API to Lambda API gateway, and suddenly I got “Internal server error” […]

Read more