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

react-native / react-figma / react-primitives supporting #11

Open
ilyalesik opened this issue Nov 20, 2020 · 10 comments
Open

react-native / react-figma / react-primitives supporting #11

ilyalesik opened this issue Nov 20, 2020 · 10 comments

Comments

@ilyalesik
Copy link

ilyalesik commented Nov 20, 2020

Proposal: react-native / react-figma / react-primitives supporting

The react-primitives family has several universal interfaces:

  • View
  • Text
  • StyleSheet (with Yoga Layout-like properties)
  • Platform
@bernaferrari
Copy link
Owner

My biggest issue is that I don't know react native. How do I make rectangles, flex, etc in it? If you are willing to help, we can do it. It is not hard, there are just too many details.

@ilyalesik
Copy link
Author

Sure, I'm very interested. I already made a little demo, the proof-of-concept of how it can works. I think that your plugin is most advanced right now, so extending them looks most reasonable.

@bernaferrari
Copy link
Owner

bernaferrari commented Nov 21, 2020 via email

@ilyalesik
Copy link
Author

@bernaferrari, it's a great idea! You can start a branch; I'll look at the result and start correcting.

@bernaferrari
Copy link
Owner

bernaferrari commented Dec 13, 2020

I have added HTML support to the main branch. Do you think it is something that can replace <div> with <View> or should it be treated as a whole new language?

@ilyalesik
Copy link
Author

@bernaferrari also styles supporting needed. React Native doesn't support CSS classes; there are their own styles instead: https://reactnative.dev/docs/style.

@bernaferrari
Copy link
Owner

bernaferrari commented Dec 13, 2020

Is there no inline styling? Should we export the layer as a component?

@ilyalesik
Copy link
Author

React Native supports inline styling

@bernaferrari
Copy link
Owner

So, the difference is just div -> View and p to Text? I support JSX already.

@DaleWebb
Copy link
Contributor

DaleWebb commented May 1, 2022

So, the difference is just div -> View and p to Text? I support JSX already.

Yes, that's effectively it. Another thing to consider is that the View layout only supports flexbox-like layouts. I think your implementation already relies on flexbox, so this probably won't be an issue

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

3 participants