React mixin which sets width as state variable and updates as component changes shape