clear-react-router 1.1.4 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +8 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -131,6 +131,14 @@ useEffect(() => {
131
131
 
132
132
  Executes a callback when the page is about to be closed or reloaded. Perfect for auto-saving data at the last moment.
133
133
 
134
+ ### `useRouterContext()`
135
+
136
+ Handles router context.
137
+ ```
138
+ const { setContext, context } = useRouterContext();
139
+ const loginHandler = () => setContext({ ...context, user: { name: 'John' } });
140
+ ```
141
+
134
142
  **Parameters:**
135
143
 
136
144
  | Parameter | Type | Description |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clear-react-router",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "A lightweight, type-safe routing library for React applications",
5
5
  "author": "Andrew Bubnov",
6
6
  "scripts": {