-
Notifications
You must be signed in to change notification settings - Fork 45
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
Support for React-primitives #11
Comments
That would be amazing to have universal rendering on web, iOS, Android, and Sketch! I'll take a look into react-primitives a bit more. My general thinking would be to maybe build that in a separate library and have examples/starter codebases that show how to hook React components into sketch-constructor. This would allow sketch-constructor to be decoupled from any front-end framework, so people are free to build Vue or Angular or other hooks into here. This would keep dependencies minimal so users don't have to pull in React libraries if they don't use React. I would imagine like a sketch-constructor-react library or something. But I'm also open to building it in the core library if it would make sense for people. Either way, I love the idea! |
Would love to help with this. I'm currently working on a design system that incorporates web, mobile and sketch. Duplicating all the components and utilities as separate files for Sketch is pretty intensive. react-primitives (or Angular / Vue variations) would help keep the components dry and works really nicely with design tokens (i.e. style dictionary). I'm messing about with an idea to write this react-sketchapp example directly to a Sketch file using the renderToJson() method and sketch-constructor. Any ideas very welcome |
|
Hey @mathieudutour - that's awesome! Thanks for sharing. |
Is there any official documentation on how to do this aside from the code in your repo ? |
@danny - serious amazing work with this library. The magic of seeing a Sketch file build and work programmatically is priceless. I've shown all my design buddies and they are speechless.
So this is an enhancement idea based on using sketch-constructor over the past week, and comparing to the build experience with Airbnb's react-sketchapp.
react-sketchapp has a lovely little compile process that converts react-primitives to json.
The beauty of this approach is that you would write your react components once, and get universal rendering to web, iOS, Andriod and Sketch.
Would be good to consider.
Thanks!
The text was updated successfully, but these errors were encountered: