Giter Club home page Giter Club logo

flip-demo's Introduction

History

2022年末,Chrome发布了 View Transition API 的实现,有了它我们不必要自己手动计算两个元素之间的偏移量.

  1. FLIP Animation
  2. Framer Motion
  3. View Transition API

Caveat

以下假设 SPA 路由间的 View Transition,不是指同一个页面内的 View Transition

  1. 必须调用 document.startTransition(),意味着 <Link> 组件需要被这个函数包裹。React 必须调用 flushSync() 这个 API
  2. 不能在中间加入 Loading View,否则是 3 个 Views 了。所以必须使用 Prefetch,提前将页面的内容加载
  3. 某些细节需要微调,有时候需要加入自定义的 animation

flip-demo's People

Contributors

thomaszdxsn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.