Currently I am using slices and redux-thunks to create my redux store. I am fairly new to redux and I quickly realized that state is not the place to store my socket connection. The socket connection is global and is used by almost all of the components. And most importantly the socket connection needs to stay open, so I can't be making a new connection on each dispatched action.
Any advice, suggestions, or examples would be much appreciated.
question from:
https://stackoverflow.com/questions/65940957/where-to-hold-my-socket-in-my-redux-store 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…