dannyfranca / qwik-router

A SPA-like router for Qwik.
MIT License
20 stars 1 forks source link

[✨] Feature request: useNavigationType #10

Open vtaits opened 6 months ago

vtaits commented 6 months ago

Is your feature request related to a problem?

Hello. There is a hook in react-router that can detect back/forward navigation. It would be great to implement this here

https://reactrouter.com/hooks/use-navigation-type

Describe the solution you'd like

An analogue of react-router implementation

Describe alternatives you've considered

https://reactrouter.com/hooks/use-navigation-type

Additional context

I'm trying to implement my react solution using qwik

https://github.com/vtaits/filterlist

And useNavigationType is used to detect back/forward navigation for state synchronization

I can make PR if you find this feature useful

dannyfranca commented 6 months ago

It seems interesting. The idea of this repo is to provide a nice SPA navigation experience for developers used to traditional frameworks as an alternative to Qwik City.

You are free to send a pull request to help implement those features. If they don't follow Qwik principles, we can constantly adjust the PR until it fits well.