Skip to content

useRouter improvement

Compare
Choose a tag to compare
@UpperCod UpperCod released this 05 Jan 14:24
· 180 commits to master since this release

useRouter used to observe the change of the routes through an immutable object, this is improved and now immutability is not necessary to observe the routes

Before

const router = useMemo(()=>({"/":()=>"home!"}));
useRouter({"/":()=>"home!"});

After

useRouter({"/":()=>"home!"});