Closed ChaseC99 closed 2 years ago
@falsidge I think you fixed some of these in #197. Feel free to open a new PR with those changes and reference this issue. I'll tackle the rest of the warnings.
One note on the materialUI spacing warning is that the stack trace sucks so I just had to comment out stuff until it disappeared to search for the issue. It turns out in the notification snackbar we were doing theme.spacing
instead of theme.spacing(MULTIPLIER)
. where MULTIPLIER is how many times the default spacing you want, and defaults to 1. Just noting this so if we get future warnings about MUI spacing we know what to look for.
@ChaseC99 Seems like the AppStore and RightPane invalid action type warnings are because they're using the same dispatcher, so any payload sent to the dispatcher is passed to the callbacks of both stores. I'm thinking of two fixes:
case undefined
or when the action type doesn't appear on a global list of valid action types across both stores.lmk what u think Also, fixing this would close #163
Clue for the functional component ref warnings: they only seem to be showing up under these conditions
So it might have something to do with the hamburger menu code. Edit: fixed at https://github.com/icssc-projects/AntAlmanac/commit/bd80dd085e4f502292b4e1002fdc8fa398f375ab
Found another warning. Seems like the problem is in News.js edit: fixed at https://github.com/icssc-projects/AntAlmanac/commit/f7091e00d256bcebb3641398df59462b884de9f2
Seems like the AppStore and RightPane invalid action type warnings are because they're using the same dispatcher
Tbh I'm not too familiar with best practices for dispatchers. For simplicity's sake, my instinct is that we shouldn't have more than one. Idk why we have both AppStore
and RightPaneStore
separately. I wonder if we can consolidate/refactor.
I'll defer to your judgement on this one. We can also ask @Nathan A
in Discord to see why it was done like this originally.
I just kept all the stores/dispatchers code the same and removed the console logs for the warnings. It's expected behavior in Flux for each store to receive all the actions from the dispatcher, even ones they don't need / can't handle (source). I was thinking about writing some code to make sure at least one listener fires for every action dispatched, but I think it's unnecessary since we only have two stores.
The console is logging warnings for lots of different things