React Native (0.39.2) - Unknown named module error

760
December 26, 2016, at 03:12 AM
React-Native "^0.39.2"
React "15.4.1"

I'm trying to import my custom component Main.jsx:

import React, { Component } from 'react';
import { Text, View } from 'react-native';
export default class Main extends Component {
    render() {
        return(
            <View>
              <Text>
                Imported
              </Text>
            </View>
        )
    }
}

within index.android.js

import React, { Component } from 'react';
import { AppRegistry, View, Text, StyleSheet } from 'react-native';
import Main from './app/components/Main'
export default class AppTest extends Component {
  render() {
    return (
        <View>
          <Main />
        </View>
    );
  }
}
AppRegistry.registerComponent('AppTest', () => AppTest);

I don't understand why I got the error unknown named module './app/components/Main', my project structure is correct:

AppTest
  |
  app
    |
    components
      |
      Main.jsx

Maybe I've wrong or forgot something very basic but can't figure out the cause

READ ALSO
jQuery Ajax doesn&#39;t work in Phonegap

jQuery Ajax doesn't work in Phonegap

I've a project in phonegap which fetch data from an my api on my server "http://gsbadm

369
TypeError while installing npm package

TypeError while installing npm package

I'm not very familiar with js-related technologies and now having trouble with package installationLog file contains these lines:

373
JavaScript Validation/Regular Expression

JavaScript Validation/Regular Expression

I need to apply validation to a text box of condition expression that expression is in one of the following formats

362
Should I create a JavaScript module for a collection of elements, or just a single element?

Should I create a JavaScript module for a collection of elements, or just a single element?

I'm using the model pattern with javaScript + Mustache to create a page where a set of subscribers can set their favorite topics (so that they can receive favorite posts from their publishers - this isn't a part of the question for now)Here is my index

283