I feel it's a bit odd to mutate global state upon instantiation of a template. Possible to do this in render?