在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:berzniz/react-overdrive开源软件地址:https://github.com/berzniz/react-overdrive开源编程语言:JavaScript 100.0%开源软件介绍:react-overdriveSuper easy magic-move transitions for React apps. DemosInstall
UsageExample with routingWrap any element (not just images) in a On import Overdrive from 'react-overdrive'
const pageA = (props) => (
<div>
<h1>Page A</h1>
<Overdrive id="bender-to-big-fry">
<img src="bender.png" width="100" height="100"/>
</Overdrive>
</div>
); On import Overdrive from 'react-overdrive'
const pageB = (props) => (
<div>
<h1>Page B</h1>
<Overdrive id="bender-to-big-fry">
<img src="fry.png" width="300" height="300"/>
</Overdrive>
</div>
); Now route between the pages. Example without routingOn import Overdrive from 'react-overdrive'
const page = (props) => (
<div>
{props.loading && <Overdrive id="content"><Loader/></Overdrive>}
{!props.loading && <Overdrive id="content"><Content/></Overdrive>}
</div>
); API
How does it work?A transition is made when an The transition is made by cloning the unmounted and mounted components, adding them with SponsorsThanks to the following companies for generously providing their services/products to help improve this project: Thanks to BrowserStack for providing cross-browser testing. Who made this?Tal Bereznitskey. Find me on Twitter as @ketacode. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论