Skip to content

Instantly share code, notes, and snippets.

@tsangpo
Created January 18, 2020 07:51
Show Gist options
  • Save tsangpo/76c8b53e2d01245774dad7db0b0d2d86 to your computer and use it in GitHub Desktop.
Save tsangpo/76c8b53e2d01245774dad7db0b0d2d86 to your computer and use it in GitHub Desktop.
Example of preact TransitionRouter
import { h } from 'preact';
import Router from 'preact-router';
import TransitionGroup from 'preact-transition-group';
export default class TransitionRouter extends Router {
render(props, state) {
return (
<TransitionGroup component="div">
{super.render(props, state)}
</TransitionGroup>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment