Hooks
Several pre-fabricated hooks are provided to help integrate with routing features. You can learn more about them below.
Note
If you're not familiar what a hook is, you should read the ReactPy docs.
Use Search Parameters¶
The use_search_params
hook can be used to access query parameters from the current location. It returns a dictionary of query parameters, where each value is a list of strings.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
Use Parameters¶
The use_params
hook can be used to access route parameters from the current location. It returns a dictionary of route parameters, where each value is mapped to a value that matches the type specified in the route path.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
Last update: October 24, 2024
Authors: