➡️ So you want to use context (https://reactjs.org/docs/context.html) 🙌
➡️ So you want your context to provide state and a function to update the state.
➡️ So you want to use Typescript.

Try this:


Photo by Steve Tsang on Unsplash

Recently I read an article about how to “get rid of if / else statements with OOP”.

Oh, I thought, probably there’s a map / associative array to match an input to an output instead of a switch or nested ifs. Cool! Let’s check it out. …


JavaScript frameworks dominate the front-end web technology conversation. But do they really make it easier to build web applications?

There is an incredibly low barrier to creating a web page. With just a text editor, pictures, words and buttons can be summoned with little effort. This is a wonderful experience…

Gabriel McCallin

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store