Code Monkey home page Code Monkey logo

react-native-common-problems's Introduction

react-native 开发常见问题

JS

RN开发使用的是JavaScript,不管是ES5,ES6, TypeScript,只要是JS的语法,RN都能用,如果遇到JS问题,请直接百度。

通用

1、RN里面真的没有好用的下拉刷新和上拉加载组件,都是用ScrollViewFlatListSectionListListView提供的效果;

iOS

1、 在不修改info.plist文件之前,一定要用https的网络请求(如何修改请百度);

2、在使用定位,拍照,相机等权限的时候,也需要在info.plist中修改,可以参考react-native-image-picker闪退的解决办法

3、搜索框、长按等出来的菜单,做本地化处理后,可显示中文;

Android

1、真机调试的时候,需要在Dev Settings里面修改Debug server host & port for device,将本地IP + :8081填入输入框;

2、真机调试的时候,如果无法通过摇一摇唤起开发菜单,可以通过终端运行adb shell input keyevent 82唤起;

3、真机调试的时候,小米、魅族要开启悬浮窗权限和关闭MIUI优化;

版本问题

已知

1、0.52版本react-native-vector-icons正常安装后不能使用。 解决方式:执行rm ./node_modules/react-native/local-cli/core/__fixtures__/files/package.json。 参考oblador/react-native-vector-icons#626

布局

虽然RN使用的是精简版Flex,但Flex有用的绝大多数属性都是可以使用的,如果遇到布局问题,请查看阮一峰的教程。 ####Flex 布局教程

稍后会将RN可以使用的Flex布局整理出来。

欢迎提PR

react-native-common-problems's People

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.