-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactored CSR into goto() function * first refectoring for router API * added test * added comments to fixture * rename + preliminary changeset * changeset: now 'minor' and featuring Mathew's example from the docs * moved for simpler diff * update after #8617 * fixed ts-errors * more comprehensible handling of intra-page state * sync with main * synch from next_tm
- Loading branch information
Showing
9 changed files
with
586 additions
and
434 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
'astro': minor | ||
--- | ||
|
||
View transitions can now be triggered from JavaScript! | ||
|
||
Import the client-side router from "astro:transitions/client" and enjoy your new remote control for navigation: | ||
|
||
```js | ||
import { navigate } from 'astro:transitions/client'; | ||
|
||
// Navigate to the selected option automatically. | ||
document.querySelector('select').onchange = (ev) => { | ||
let href = ev.target.value; | ||
navigate(href); | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.