Re: switching states via hooks