react-native redux 集成的一些坑

  1. react版本不同,控件的位置也不同,导致undefined
    super expression must either be null or a function, not undefined
老版本:
import React, {
  Component
} from 'react-native'
新版本:
import React,{ 
  Component
} from 'react';
  1. redux
老版本:
import { Provider } from 'react-redux/native';
新版本
import { Provider } from 'react-redux';
  1. 巨坑..onlyChild must be passed a children with exactly one child
老版本:

            {() => }
            
新版本:

            
            

网上很多解决办法集中在Touchable开头的组件,其实是原因在provider的child。

你可能感兴趣的:(react-native redux 集成的一些坑)