Since this issue is to resolve the state being set while style is null, the above few lines (542-547) would be more appropriate to be placed before line 471-477 where all the preview bubble updates happen