Make key state defonce for reloading