Today I learned

while using .src can be an option, it isn’t really a functional one for grabbing something from the component. I use relative paths for the initial link but the output on firefox is the absolute path making matching difficult

Also, keyof typeof is the best way to make sure something is of the type options to the key of a specific enum

let newFirst = event.currentTarget.id as keyof typeof ElementalColors;

--

--

--

Starting a tech bootcamp

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Angular 9 — faster and smaller

https://link.medium.com/5UE3yTZgLmb

Smart Hand Glove

Firebase analytics in React native app

Firebase analytics in React native app

JavaScript Hoisting

Development in React Native Platform with HMS Location kit, Map kit, Site Kit-1

How to Make an Image Gallery in React: Coronavirus Edition

Djs Have Many Playlists

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
Jesse Chung

Jesse Chung

Starting a tech bootcamp

More from Medium

How I Got Here

Rewire Yourself, Rewrite Yourself

A New Equilibrium