当前位置: 首页 > Web前端 > CSS

react-template-easily(简单易用的react前端工程模板)

时间:2023-03-30 16:38:19 CSS

react-template-easilyDesc:react-template-easily是一套使用react技术构建的项目模板,适用于移动H5、webapp和混合应用开发。包含20+个常用组件,精算rem,以及多个项目的实践。网址:https://github.com/jinjiaxing/react-template-easilyDemo:Demo展示(请使用chrome模拟移动端查看,或使用手机查看)技术栈react:16react-dom:16react-router-dom:4redux:3.7.2redux-thunk:2.2react-redux:5.0.6sasspostcsswebpack:3.8.1iscroll:5...目录结构及文件说明client客户端的主目录,PS:为加入服务器做准备以后的SSR,所以叫client--actionsRedux把所有的action都放在里面--commonAction.jsx把常用的action放在里面--pageHomeAction.jsx首页Demo的Action--commonpublicutil文件夹--constant常量--CommonActionName.jsx动作全名--Constant.jsx常量变量集合--StatisticConstant.jsx自定义其他常量灯--img公共图片--style公共css文件--utils公共util类--Common.jsx所有公共方法和rem计算都在这个文件--component所有react组件--common常用的组件自定义一些常用的components--组件持续更新中--business放自己的业务组件(没有creator文件夹,可以自己创建)--pages存放所有页面组件--PageHomedemo首页组件--img存放各个的图片page--_pageHome.scss每个页面的独立样式文件--PageHome.jsx组件jsx文件--reducers把所有reducer放到这个文件夹下--commonReducer.jsx普通reducer--mainReducer.jsx用来连接各个reducer--pageHomereduces.jsx演示首页reducer--servicehttp请求类库--Service.jsx使用的方法ofajax/jsonp请求都在这里,应用promise--store--store.jsx--app.jsx相当于页面的父容器组件,进行一些通用处理--index.htmlhtml文件--router.jsx入口文件也是路由文件install&rungitclonehttps://github.com/jinjiaxing/react-template-easily.gitnpminstallnpmrundev浏览器访问:0.0.0.0:8080releasenpmrunreleaseorsh./build.shpreactdev&releasenpmrundev:preactnpmrunrelease:preact如何切换react和preact请点这里更新2017/10/22添加Drawer组件2017/12/01修改Toast组件默认样式2017/12/02修改Toast组件结构2018/01/02更新所有组件样式2018/01/04添加InputField组件2018/01/08添加preact版本,支持preact和react一键切换developername:jinjiaxingcompany:baidumail:34568305@qq.com