Closed donkeyDau closed 4 years ago
Any updates on this please?
I ended up using the useEffect
hook. Not exactly the same but I don't mind the slight delay
componentWillMount
is not deprecated in Preact. The Redirect
implementation posted here seems fine to me.
So why is it labeled as (deprecated) in the docs (https://preactjs.com/guide/v10/components#lifecycle-methods)?
The README proposes this code to create a redirect.
but according to https://preactjs.com/guide/v10/components#lifecycle-methods
componentWillMount
is deprecated. Which lifecycle method is a proper replacement?