tss react
v4.9.14

基于情感的动态CSS-IN-TS解决方案
主页 - 文档 - 操场
您可以将tss-react视为@emotion/jss 。
从本质上讲,这是JSS API的类型安全,但由情感提供支持,就像@emotion/styled是样式的组件API一样,但由情感支持。
$语法的类型安全。@emotion缓存。withStyles API的特征,以帮助您远离 @Mitalial-UI V4。@emotion/react之上,它对MUI(〜5kb Minziped)的捆绑尺寸几乎没有影响。'tss-react'可以用作 @Material-UI V4 makeStyles和'react-jss'的有利替代品。tss-react将不会是您的peerDependencies的另一个条目。虽然此模块是用打字稿编写的,但是应用程序中使用TypeScript是可选的(但建议您和您的代码库都具有出色的好处)。
开始
项目越多,我花费的时间就越多。谢谢您的支持?
不用提及,该库受到JSS和OG CSS-IN-JS解决方案的启发。
运行演示应用程序:
git clone https://github.com/garronej/tss-react
cd tss-react
yarn
yarn build
npx tsc -w & npx tsc --module es2015 --outDir dist/esm -w
# Open another Terminal
yarn start_spa # For testing in in a Create React App setup
yarn start_ssr # For testing in a Next.js setup
yarn start_appdir # Next.js 13 setup in App directory mode 要报告安全漏洞,请使用Tidelift安全联系人。 Tidelift将协调修复和披露。