Flipboard / Flipboard/react-canvas

Announcing React-RETINA (<canvas> for React v15 & also Preact compatible, and supports variable sized ListView)

Open
#160 13 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
13.2k
Forks
909
PR merge metrics
No merged PRs in 30d

Description

This library is an alternative Canvas implementation for React v15 (which react-canvas has not yet been updated to use). It is also compatible with Preact.

https://github.com/xphung/react-retina

Features:
1. Gallery component supports variable sized pages (whereas react-canvas ListView is limited to fixed size pages)
2. React-RETINA only uses standard/public React APIs.
3. The React Retina design avoids numerous React v15 anti-patterns (which React Canvas/React ART are guilty of using). There are no mixins, string Refs, or even Contexts. It does not use non standard lifecycle methods.
4. The React RETINA component library source code is much easier to understand as a result and is leaner and cleaner.
5. The View base component is extremely lightweight and specialised components (Image, Text, etc) are built on top of View via a custom draw callback. This is very flexible and allows virtually any drawable shape or component to be built on top of View.
6. The React RETINA Backing Store implementation is simpler and cleaner to use - instead of requiring specialised hooks/lifecycle to manage invalidation and repaints, just assign a unique ID to the `useBackingStore` property to make the View the cache a repaint. Simply assign a new ID whenever an invalidation and repaint into Backing Store is required ... no need for a special Javascript calls or API to invalidate cache data!
7. Keyboard events are supported!!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.