0.0.4 • Published 2 years ago
react-use-estyles v0.0.4
Adding useEStyles hook for Material UI Emotion V5
Motivation
Material UI v5 is moving away from JSS in favor of Emotion. This hook allows users keep creating JSS based styling by using Emotion under the 🪝.
Install
npm i react-use-estyles
Usage
import React from "react";
import { useEStyles } from "react-use-estyles";
const styles = (theme) => ({
root: {
color: theme.palette.primary.main
}
});
const ComponentWithStyles = () => {
const classes = useStyles(styles);
return <div className={classes.root}/>;
}