Is it a good practice to declare and manage state variables in a module?

I’m also interested in understanding this.
Since we’re building the Motoko CDK for the IC WebSocket, I was facing the same questions and I was discussing about it with @luc-blaeser two weeks ago, so he may have good suggestions.
Following the topic!