Git Product home page Git Product logo

react-native-template-pro's Introduction

react-native-template-pro

Maintenance GitHub license

React Native template with a nice folder structure, navigation, database and async and debugging tools support.

Requirements


Installation


react-native init MyMillionDollarApp --template pro

cd MyMillionDollarApp

yarn add --dev reactotron-react-native reactotron-redux reactotron-redux-saga

or

npm install --save-dev reactotron-react-native reactotron-redux reactotron-redux-saga

What's included


Jetbrains Webstorm snippets


See how to create and use

  • Stateful component
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {View, Text, StyleSheet} from 'react-native';

export default class $ComponentName$ extends Component {
  render() {
    return (
      <View>
        <Text>$ComponentName$</Text>
        $END$
      </View>
    );
  }
}

$ComponentName$.propTypes = {};
const styles = StyleSheet.create({});
  • Stateful Redux component
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import * as $storeProp$Actions from '../actions/$storeProp$';
import {View, Text, StyleSheet} from 'react-native';

class $ComponentName$ extends Component {
  render() {
    return (
      <View>
        <Text>$ComponentName$</Text>
        $END$
      </View>
    );
  }
}

$ComponentName$.propTypes = {
  data: PropTypes.oneOfType([
    PropTypes.string,
    PropTypes.array
  ]),
  error: PropTypes.boolean,
  loading: PropTypes.boolean,
};

const styles = StyleSheet.create({});

const mapStateToProps = state => ({
  data: state.$storeProp$.data,
  error: state.$storeProp$.error,
  loading: state.$storeProp$.loading
});
const mapDispatchToProps = dispatch => bindActionCreators($storeProp$Actions, dispatch);

export default connect(mapStateToProps, mapDispatchToProps)($ComponentName$);
  • Stateless component
import React from 'react';
import PropTypes from 'prop-types';
import {
  View,
  Text
} from 'react-native';

const $ComponentName$ = () => (
    <View>
      <Text>$ComponentName$</Text>
      $END$
    </View>
);

$ComponentName$.propTypes = {};

export default $ComponentName$;

Roadmap


  • Integrate mobile database
  • Fully integrate react-navigation to redux
  • Add more reusable components

Known issues


Contributing


This is an initial release, feel free to submit your issues or PR's!

License


MIT

react-native-template-pro's People

Contributors

thiagobrez avatar

Stargazers

Raphael R. avatar

Watchers

Raphael R. 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.