- From: Matt Perry via GitHub <sysbot+gh@w3.org>
- Date: Fri, 10 Nov 2023 13:27:09 +0000
- To: public-css-archive@w3.org
Sorry for the delay, have been working further with View Transitions API. There's not a place in the existing code where I would put the call. What I would do is have something like a `PageTransition` that accepts the latest path. ```jsx <PageTransition path={latestUrl}>{content}</PageTransition> ``` This would be a React component that looks like ```javascript class PageTransition extends React.Component { getSnapshotBeforeUpdate(prevProps) { if (this.props.path !== prevProps.path) { this.transition = document.snapshotViewTransition() } } componentDidUpdate() { if (this.transition) { this.transition.notifyUpdated() } } } ``` -- GitHub Notification of comment by mattgperry Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9400#issuecomment-1805724812 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 10 November 2023 13:27:11 UTC