stop using side effects via closure; use instance props instead.