I am learning react and it just seems wrong to have top-level variables. I always hear that I need to use state but it is hard to use state when there are many classes/funct