elemental-design / elemental-design/react-platform

Dimensions and PixelRatio API

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
17
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Do we want to support React Native's `Dimensions` and `PixelRatio`? Or discourage their use?

I propose supporting them, and adding injection systems for `react-sketchapp` to use global screen dimensions and pixel ratio values, but to later have an opt-out console warning layer to discourage their use and push for using `useWindowDimensions` instead, as dimensions should not be used as static values.

The main use-case for this would be aliasing `react-sketchapp`/`react-figma` to `@react-platform/native` and keeping things somewhat working. While aliasing will be discouraged by this project, it's a nice way to get a quick proof-of-concept running before refactoring a codebase to import common primitives.

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.