Reselim / roact-router

Declarative routing for Roact, based off of React Router
MIT License
22 stars 10 forks source link

Remove roact-hooks dependency #13

Closed sasial-dev closed 2 years ago

sasial-dev commented 2 years ago

Removes the dependency on @rbxts/roact-hooks, allowing for an alternate implementation to be used.

sasial-dev commented 2 years ago

The syntax means you can also do

useHistory({ useContext })

If you are manually importing hooks instead of them all being provided!

sasial-dev commented 2 years ago

The typings account for this, and only require the used hooks.

sasial-dev commented 2 years ago

I was 50/50 split in creating a new .d.ts file (hooks.d.ts) vs combining it all in index.d.ts. Let me know if you'd want me to recombine the files.

Reselim commented 2 years ago

LGTM - thank you so much! I'll publish this right away.