clear-react-router 2.4.5 → 2.4.6
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.
- package/README.md +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -294,6 +294,8 @@ screen readers) intact:
|
|
|
294
294
|
Reach for `as` only when the element itself must change (a `<button>`, a UI-kit component)
|
|
295
295
|
— for looks alone, attributes + CSS are simpler and accessible by default.
|
|
296
296
|
|
|
297
|
+
### Prefetch examples
|
|
298
|
+
|
|
297
299
|
```tsx
|
|
298
300
|
// Global prefetch: hover with 100ms delay
|
|
299
301
|
<Router routes={routes} defaultPrefetch="hover" defaultHoverPrefetchDelay={100} />
|
|
@@ -307,7 +309,11 @@ Reach for `as` only when the element itself must change (a `<button>`, a UI-kit
|
|
|
307
309
|
<Link to="/admin" prefetch="none">
|
|
308
310
|
Admin Panel
|
|
309
311
|
</Link>
|
|
312
|
+
```
|
|
310
313
|
|
|
314
|
+
### Appearance and behavior examples
|
|
315
|
+
|
|
316
|
+
```tsx
|
|
311
317
|
// With custom active/pending classes
|
|
312
318
|
<Link to="/settings" activeClassName="active-nav-link" pendingClassName="loading-nav-link">
|
|
313
319
|
Settings
|