react-primitives | Primitive React Interfaces Across Targets | Frontend Framework library
kandi X-RAY | react-primitives Summary
kandi X-RAY | react-primitives Summary
This library attempts to propose an ideal set of primitives around building React applications, regardless of Platform. In the future, this could be used as a shared interface among React and React Native components that don't use platform-specific APIs. Importantly, this includes StyleSheet for declaring styles, as well as Animated for doing declarative Animations.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of react-primitives
react-primitives Key Features
react-primitives Examples and Code Snippets
Community Discussions
Trending Discussions on react-primitives
QUESTION
We're trying to create a common UI component library for both our designers and developers with React. In other words - we want to render our component library to both react-dom
and react-sketchapp
.
We would love to specify the structure once, the styles once and the behavior once.
We can get there (kind of at least) with projects like react-primitives
or styled-components/primitives
, but this approach basically stops us from having any semantics in our HTML. When all you have to work with is Text
, you can't really specify whether that text is a
or an
How have people dealt with sharing code this way previously? How can we basically render HTML (via JSX) to Sketch?
...ANSWER
Answered 2017-Sep-25 at 18:55You can create your own primitives by creating multiple files targeting different platforms.
For example, if you would like to create a primitive for h1
, you would create a file called h1.web.js
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-primitives
web: npm install --save react-dom react-native-web react-art
native iOS and Android: npm install --save react-native
sketch: npm install --save react-sketchapp react-test-renderer
figma: npm install --save react-figma
vr: npm install --save react-360
Windows: npm install --save react-native-windows
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page