Skip to content

Latest commit

History

History
21 lines (12 loc) 路 656 Bytes

File metadata and controls

21 lines (12 loc) 路 656 Bytes

Are global variables bad?

Are global variables bad?

Well, it depends.

In my projects, I often create global variables such as const widgets or Riverpod providers, and there鈥檚 nothing wrong with that!

But global MUTABLE state IS dangerous (hard to know who changed it and which widgets should rebuild).


Found this useful? Show some love and share the original tweet 馃檹


Previous Next
Measuring execution time in Dart Inspecting Network Requests (DevTools)