2016-12-01 7 views
0

新しいReact Nativeプロジェクトを作成し、プロジェクトに@ shoutem/uiをインストールし、Shoutem UIのExamplesコンポーネントをReact Nativeアプリに含めます。不明な名前付きモジュール: 'react/lib/NativeMethodsMixin'

import React, { Component } from 'react'; 
import { AppRegistry } from 'react-native'; 
import { Examples } from '@shoutem/ui'; 

class HelloWorld extends Component { 
    render() { 
    return (
     <Examples /> 
    ); 
    } 
} 

AppRegistry.registerComponent('HelloWorld',() => HelloWorld); 

しかし、私はプロジェクトを開始する実行したとき、私は「不明という名前のモジュールを: 『/ libに/ NativeMethodsMixin反応する』」を取得エラー。 https://github.com/shoutem/animation/blob/develop/Parallax.js NativeMethodsMixinreactから正しくインポートされていません:

あなたはこの変更した場合:これに import NativeMethodsMixin from 'react/lib/NativeMethodsMixin'; を:

答えて

2

バグがParallax.jsファイルには、@shoutem/animationモジュール内であるように思わimport NativeMethodsMixin from 'react'; あなたのアプリが動作するはずです。

私は@shoutem/animationプロジェクトのGithubの問題をファイルまたはチェックNativeMethodsMixinがインポートされている方法は、reactの古いバージョンに固有のものであれば、その後、あなたのアプリケーションでそのバージョンを使用するのいずれか。

こちらがお役に立てば幸いです。

+0

ありがとうございます。 – Kais

関連する問題