Going through a Twitter thread with +100 tweets is not handy at all. So here's the compilation of all the tweets for each day (so far).
#100DaysOfFP Day 03
Using Task (by @sherman3ero) instead of Promise to handle async code. Task is lazy, errors are typed and it differentiates between mapping, chaining and consuming the result.
Task: github.com/ts-task/task & github.com/ts-task/fetch
Code: codesandbox.io/s/30jm8oymx622:04 PM - 08 Jan 2019
#100DaysOfFP Day 04
Replaced the state values used to keep track of the status of the fetch with the RemoteData type. Not only the render method is much simpler but all the states are consistent as we cannot have combinations that don't make sense.
Code: codesandbox.io/s/q7yl9v6qn422:28 PM - 09 Jan 2019
I like how you handle effects in standalone functions instead of methods that are tied to a class. Those functions can be tested very easily in isolation and the runtime, React in this case, guarantees they will work in the context of the component.08:34 AM - 11 Jan 2019
#100DaysOfFP Day 06
Here's the implementation of RemoteData. Very simple, just a wrapper to encapsulate the different states of fetching data.
Will work on adding tests to make sure it satisfies the laws in following days.
Code: github.com/gillchristian/…22:11 PM - 14 Jan 2019