Web dev here, just spent a while trying to figure out some React shit. Finally came up with a solution.