React笔记三:创建第一个组件
1、src文件夹下新建一个components文件夹
2、在components文件夹中新建一个button文件夹
3、在button文件夹中新建index.tsx文件和styles.module.scss文件
4、编写第一个组件
1 | |
5、使用组件
1 | |
6、添加样式
1 | |
7、安装classnames模块
1 | |
8、引入样式
1 | |
React笔记三:创建第一个组件
https://blog.virs.xyz/2020/06/11/281/
1、src文件夹下新建一个components文件夹
2、在components文件夹中新建一个button文件夹
3、在button文件夹中新建index.tsx文件和styles.module.scss文件
4、编写第一个组件
1 | |
5、使用组件
1 | |
6、添加样式
1 | |
7、安装classnames模块
1 | |
8、引入样式
1 | |