Since we only ever do "spot checks" of this state, and don't need to pass it as a dep somewhere in order to make it auto-update, we should probably use a ref instead of state.
The advantage is that performance is better since fewer things need to be recalculated.
I originally did this because the registration call was using an version of the setUserAvatar call that was bound before registration, and it wasn't getting the updated registrationMode after the previous diff. I ended up having to separate the avatar-setting code anyways (as other things were getting bound in, such as the cookie)... but I still think this change is a good one, for the performance reasons described above.
Depends on D8152