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

**URL:** <https://forum.dfinity.org/t/is-it-a-good-practice-to-declare-and-manage-state-variables-in-a-module/23315>\
**Category:** Motoko\
**Created:** [September 26, 2023, 9:28am UTC](https://forum.dfinity.org/t/is-it-a-good-practice-to-declare-and-manage-state-variables-in-a-module/23315 "2023-09-26T09:28:49Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ilbert](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ilbert/32/8717_2.png) [@ilbert](https://forum.dfinity.org/u/ilbert)\
**Post date:** [September 26, 2023, 10:55am UTC](https://forum.dfinity.org/t/is-it-a-good-practice-to-declare-and-manage-state-variables-in-a-module/23315/2 "2023-09-26T10:55:52Z")

</div>

I’m also interested in understanding this.  
Since we’re building the Motoko CDK for the [IC WebSocket](https://forum.dfinity.org/t/ic-websocket-roadmap/21503), 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!

---

_[View the full topic](https://forum.dfinity.org/t/is-it-a-good-practice-to-declare-and-manage-state-variables-in-a-module/23315)._
