GithubHelp home page GithubHelp logo

cuitymiko / react-native-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from coderabbityu/react-native-template

0.0 1.0 0.0 383 KB

JavaScript 81.10% Python 4.29% Java 3.72% Objective-C 10.89%

react-native-template's Introduction

react-native-template

致力于打造一个快速开发RN项目的模板

登录效果

使用小技巧

项目中常用的封装都放在app目录下Common文件夹

1、FontSize.js:基于屏幕分辨率封装的字体适配方法,使用方法:fontSize:FONT_SIZE(14)

2、Tool.js:封装常用的属性方法,比如说判断是否登录,或者其他的方法,在这个方法中,提供了用来做安卓,iOS换算px的方法,使用方法:width:px2dp(100)

3、global.js:全局变量方法,一般我会用来设置全局的方法,比如说:系统判断,屏幕宽高,主题设置,图片初始化。 具体的详情可以查看global.js内部注释。

4、Config.js:配置文件,可以用来配置请求网址,配置表等等。

5、SetTheme.js:更改主题,teaset提供了设置主题和切换主题的能力,但有些时候,有一些颜色需要再手动调整,所以创建了这个文件,通过在里面配置颜色,并在项目的入口中引入,就可以直接使用Theme.backgroundColor的方式调用颜色了。

6、Request.js:基于react-native-fetch-blob封装的网络请求方法,很简单,不喜勿喷。

7、Images.js:在Resources目录下有index.jsImages.js两个文件,这是基于Marno关于图片管理文章封装的实践。

2017.11.7更新说明

1、使用teasetSegmentedView组件实现左右滑动的效果。

2、使用teasetTheme控制页面中的颜色。

3、使用Mobx控制登录中的状态,简单使用。

4、修改tabbar选中图标和文字的颜色,使其更符合识兔项目的效果。

react-native-template's People

Contributors

coderabbityu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.