美文网首页React Native开发
react-native 项目结构规范

react-native 项目结构规范

作者: lanegg | 来源:发表于2016-07-20 15:42 被阅读201次

    react-native 项目结构规范

    .
    ├── index.ios.js
    ├── index.android.js
    └── src
        ├── component           可复用的组件(非完整页面)
        ├── module              业务模块
        ├── config              配置项(常量、接口地址、路由、多语言化等预置数据)
        ├── util                工具类(非UI组件)
        ├── style               全局样式
        └── image               图片
    

    在component和module目录中,可能还有一些内聚度较高的模块再建目录

    module/component
    ├── HomeView.component.js
    ├── HomeView.style.js
    └── MovieView
        ├── MovieList.component.js          
        ├── MovieList.style.js          
        ├── MovieCell.component.js          
        ├── MovieCell.style.js              
        ├── MovieView.component.js          
        └── MovieView.style.js              
    

    相关文章

      网友评论

        本文标题:react-native 项目结构规范

        本文链接:https://www.haomeiwen.com/subject/qrwmjttx.html