React Styles Hook
Simple hook for simplify CSS styling in React JS. Very Light-weight.
Table of contents
Why ?
In ReactJS, sometimes we have difficulty to styling because of limitations types
intellisense in CSS properties. By using this hook we can find out what properties in CSS we can use.
If you don't get what i'm talking about, maybe i will explain in essence: This hook API is almost similiar to React Native Stylesheet.create().
Here is the screenshots:
Installation
# with npm $ npm i react-styles-hook --save # with yarn $ yarn add react-styles-hook
Example Usage
Standard styles Example
const App = <div style=stylescontainer> <h1 style=stylestitle>Hello React 👋</h1> </div> const styles =
Dynamic styles example
const App = { const isPink switchPink = const styles = const handleClick = { } return <> <h1 styles=stylesheading>Hello React 👋</h1> <button onClick=handleClick> Click Me! </button> </> }
© 2020 Sutan Gading Fadhillah Nasution.