Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dimensions and PixelRatio API #3

Open
macintoshhelper opened this issue May 15, 2020 · 0 comments
Open

Dimensions and PixelRatio API #3

macintoshhelper opened this issue May 15, 2020 · 0 comments

Comments

@macintoshhelper
Copy link
Member

macintoshhelper commented May 15, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant