Git Product home page Git Product logo

ignite-andross's Introduction

logo

Ignite "Andross" Boilerplate

Why is this archived?

We really appreciate all the community support in the years since we first released ignite-andross. Our focus has shifted to the latest version of Ignite, which includes the latest version of our boilerplate. Feel free to fork this library and continue on its legacy if you want.

NOTE: This repo has been renamed from ignite-ir-boilerplate-andross to ignite-andross. Although web traffic and git operations for the previous name will be redirected, we recommend you update any links and git urls for this repo.

The original tried and true boilerplate for Infinite Red's React Native apps

Currently includes:

  • React Native 0.63
  • React Navigation 4.0.0
  • Redux
  • Redux Sagas
  • And more!

Quick Start

When you've installed the Ignite CLI, you can get started with this boilerplate like this:

npx ignite-cli new MyLatestCreation

By default we'll ask you to choose which boilerplate you'd like. If you just want to use this one you can specify it with --boilerplate or -b:

npx ignite-cli new MyLatestCreation --boilerplate andross

You can also change the React Native version; just keep in mind, we may not have tested this just yet.

npx ignite-cli new MyLatestCreation --react-native-version 0.99.0-rc.2

By default we'll ask you some questions during install as to which features you'd like. If you just want them all, you can skip the questions:

npx ignite-cli new MyLatestCreation --max

If you want very few of these extras:

npx ignite-cli new MyLatestCreation --min

Boilerplate walkthrough

Your App folder is where most of the goodies are found in an Ignite Next app. Let's walk through them in more detail. Start with Containers/App.js (described below) and work your way down the walkthrough in order.

Containers

Containers are (mostly) full screens, although they can be sections of screens or application containers.

  • App.js - your main application. We create a Redux store and configure it here
  • RootContainer.js - main view of your application. Contains your status bar and navigation component
  • LaunchScreen.js - this is the first screen shown in your application. It's loaded into the Navigation component
  • Styles - styling for each of the above containers and screens

To generate a new Container or Screen you can use the following generator commands:

  • npx ignite-cli g container New - Will create a New.js and also a Styles/NewStyle.js.
  • npx ignite-cli g list New - The same as the container command, but it will give you a walkthrough to generate a ListView screen. Allowing you to even pick FlatList or not, grid, and some other options.
  • npx ignite-cli g screen New - Will create a NewScreen.js and also a Styles/NewScreenStyle.js. Important to mention that the screen generator will add the Screen on the file/class name to make easier to identify.

Those commands will also add the new container to the navigations file.

Navigation

Your primary and other navigation components reside here.

  • AppNavigation.js - loads in your initial screen and creates your menu(s) in a StackNavigation
  • Styles - styling for the navigation
  • ReduxNavigation.js - This file contains the core navigation of your application. If you ever change your launch screen, make sure to change it also at if (nav.routes.length === 1 && (nav.routes[0].routeName === 'LaunchScreen')) {, otherwise you may encounter navigation problems with the Android back button!

Components

React components go here...pretty self-explanatory. We won't go through each in detail -- open each file to read the comments and view the code.

To generate a new Component you can use the following generator commands:

  • npx ignite-cli g component New - Will create a New.js and also a Styles/NewStyle.js.
  • npx ignite-cli g component path/New - The same as above, but will use a relative path
  • npx ignite-cli g component --folder path - An alternative to npx ignite-cli g component path/index
  • npx ignite-cli g component --folder path new - An alternative to npx ignite-cli g component relativePath/New

Storybook

Storybook has been setup to show off components in the different states. Storybook is a great way to develop and test components outside of use in your app. Simply run npm run storybook to get started. All stores are contained in the *.story.js files along side the components.

Themes

Styling themes used throughout your app styles.

  • ApplicationStyles.js - app-wide styles
  • Colors.js - defined colors for your app
  • Fonts.js - defined fonts for your app
  • Images.js - loads and caches images used in your app
  • Metrics.js - useful measurements of things like navBarHeight

Config

Initialize and configure things here.

  • AppConfig.js - simple React Native configuration here
  • DebugConfig.js - define how you want your debug environment to act
  • ReactotronConfig.js - configures Reactotron in your project (Note: this will be extracted into a plugin in the future)
  • ReduxPersist.js - configures Redux Persist (Note: this will be extracted into a plugin in the future)

Fixtures

Contains json files that mimic API responses for quicker development. These are used by the Services/FixtureApi.js object to mock API responses.

Redux, Sagas

Contains a preconfigured Redux and Redux-Sagas setup. Review each file carefully to see how Redux interacts with your application.

Here again we have generators to help you out. You just have to use one of the following:

  • npx ignite-cli g redux Amazing - Will generate and link the redux for Amazing.
  • npx ignite-cli g saga Amazing - The same as above, but for the Sagas

You can read more about Redux and Redux Sagas in these blog posts:

Services

Contains your API service and other important utilities for your application.

  • Api.js - main API service, giving you an interface to communicate with your back end
  • ExamplesRegistry.js - lets you view component and Ignite plugin examples in your app
  • FixtureApi.js - mocks your API service, making it faster to develop early on in your app
  • ImmutablePersistenceTransform.js - part of the redux-persist implementation (will be removed)
  • RehydrationServices.js - part of the redux-persist implementation (will be removed)

Lib

We recommend using this folder for modules that can be extracted into their own NPM packages at some point.

Images

Contains actual images (usually png) used in your application.

Transforms

Helpers for transforming data between API and your application and vice versa. An example is provided that you can look at to see how it works.

Tests

This folder (located as a sibling to App) contains sample Jest snapshot and unit tests for your application.

If you would like to have the npx ignite-cli generate command include the generation of tests when available, add "tests": "jest" or "tests": "ava" to ./ignite/ignite.json, depending on the test runner you are using.

Previous Boilerplates

Premium Support

Ignite CLI and Ignite Andross, as open source projects, are free to use and always will be. Infinite Red offers premium Ignite CLI support and general mobile app design/development services. Email us at [email protected] to get in touch with us for more details.

ignite-andross's People

Contributors

amurmurmur avatar bencergazda avatar carlinisaacson avatar derekgreenberg avatar dkocich avatar fr33maan avatar gantman avatar imokhles avatar jamonholmgren avatar jankalfus avatar jbosse avatar jbreuer95 avatar karlingen avatar kevinvangelder avatar lvlrsajjad avatar morgandonze avatar mwarger avatar nonameolsson avatar raheel avatar raviqqe avatar rmevans9 avatar robinheinze avatar ruddell avatar rwoverdijk avatar ryanlntn avatar sandeshvakale avatar semantic-release-bot avatar skellock avatar superp avatar thesupermacy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ignite-andross's Issues

More explanation of redux, rehydration, sagas and reactotron

Hi, I'm loving the boilerplate but am having trouble groking the startupsaga, rehydration and the integration with reactotron. I think some background description in the documentation would help. It should explain the structure, purpose and interaction of those pieces. I've researched redux and sagas apart from the boilerplate but when I try to follow the code I'm just missing the context I guess.

Removing getUser from Api.js results in error

Hi,

I'm new to react-native & ignite, was following the YouTube guide on how to add API to the application.
There seems to be some kind of dependency on getUser since removing this API results in error. I tried removing other two APIs getRate and getRoot, but they were fine.
I'm getting "uncaught at check call argument fn is undefined"
Since I'm new to this, I'm not able to debug what's going on here, but should have worked fine as per the YouTube guide.
screen shot 2017-05-17 at 10 34 41 am

Error when generating listview

Running ignite g listview TestScreen successfully generates but outputs:

vvv -----[ DEBUG ]----- vvv
TypeError: print.log is not a function
    at Object.module.exports [as run] (/Users/joe/Documents/TestIgniteApp/node_modules/ignite-ir-next/commands/listview.js:95:11)
    at process._tickCallback (internal/process/next_tick.js:109:7)
^^^ -----[ DEBUG ]----- ^^^

ignite doctor:

System
  platform           darwin
  arch               x64
  cpu                4 cores                                 Intel(R) Core(TM) i5-5287U CPU @ 2.90GHz
  directory          /Users/joe/Documents/TestIgniteApp

JavaScript
  node               7.8.0        /usr/local/bin/node
  npm                4.2.0        /usr/local/bin/npm
  yarn               0.22.0       /usr/local/bin/yarn

React Native
  react-native-cli   2.0.1
  app rn version     0.42.0

Ignite
  ignite             2.0.0-beta.8   /usr/local/bin/ignite

Android
  java               1.8.0_45     /usr/bin/java
  android home       -            /Users/joe/Library/Android/sdk

iOS
  xcode              8.3

Outdated on NPM

Could you guys update NPM to the rc.7 version so ignite new will use this latest awesome one :)

Add Jest snapshot tests

  • replace "Tests/Setup.js" with Jest mocks and ensure existing component tests still run, otherwise fix issues.
  • Add "updateSnapshot": "jest --updateSnapshot" as a script in package.json
  • If a snapshot test of an ignite-ir-next component covers 100% of the code, replace the unit test with a snapshot test
  • Otherwise, supplement the snapshot test with enzyme/shallow tests to exercise code that is not covered by the snapshot test. A simple example is a component with an onPress handler that invokes the handler that was passed in as a prop. The snapshot test does not cover this.

Upgrade

How to properly upgrade to 2.1.0 with all the changes currently setup project based on a previous version of this awesome boilerplate 2.0.1

I've setup a project via ignite cli

error after deleting node_modules and running npm i

I was dealing with an error and as I often do in this scenario I deleted the node_modules and ran npm install again which is supposed to work and always works normally

But then I got this error

Could not install /Volumes/Omitted/IgniteNext/node_modules/ignite-ir-boilerplate

This is because in the package.json you have this:

"ignite-ir-boilerplate": "file:/Volumes/Omitted/IgniteNext/node_modules/ignite-ir-boilerplate",

After running this on ignite 2.0.0-rc.1

ignite new MyApp

Why does it do this? Other boilerplates install the package normally so that it can be re-installed. The whole thing shouldn't break if you delete the node_modules folder in my opinion. Not sure I understand the reasoning here

Tests for listview are failing

$ npm run test

[email protected] test /Users/eric/Code/ignite-ir-next
ava --concurrency=1

7 passed
3 failed

generators-integration › generate listview of type row works
/Users/eric/Code/ignite-ir-next/IntegrationTest/test/generators-integration.test.js:24

Actual:

false

Expected:

"file"

Test. (test/generators-integration.test.js:24:5)
step (test/generators-integration.test.js:3:191)

generators-integration › generate listview of type sections works
/Users/eric/Code/ignite-ir-next/IntegrationTest/test/generators-integration.test.js:32

Actual:

false

Expected:

"file"

Test. (test/generators-integration.test.js:32:5)
step (test/generators-integration.test.js:3:191)

generators-integration › generate listview of type grid works
/Users/eric/Code/ignite-ir-next/IntegrationTest/test/generators-integration.test.js:40

Actual:

false

Expected:

"file"

Test. (test/generators-integration.test.js:40:5)
step (test/generators-integration.test.js:3:191)

Hot Module Reloading

With this boilerplate I´ve encountered that changing anything in reducers or sagas often requires a full reload. With the error message that with the react-redux 2.0+ releases changing the store on the fly is not supported.

Now I've been playing around with this and got the reducer hot module reloading working by changing the store creation modules. I've moved the code from App/Redux/CreateStore to App/Redux/Index and changed/added the following:

-------------------------------------------------------------------------------
(above default export function)
-------------------------------------------------------------------------------

const allReducers = {
  github: require('./GithubRedux').reducer,
  login: require('./LoginRedux').reducer,
  search: require('./SearchRedux').reducer
}

-------------------------------------------------------------------------------
(after saga kickoff in the default export function which creates the store)
-------------------------------------------------------------------------------

if (module.hot) {
    module.hot.accept(() => {
        const nextRootReducer = combineReducers(allReducers)
        store.replaceReducer(nextRootReducer)
    })
}

This works with changing the reducers quite nicely. But I noticed the ReduxPersist RehydrationServices.updateReducers(store) function call. Should this also be called after the store is updated with a reducer hmr?

And on the topic of HMR, updating Sagas is not handled by this update method. This can be implemented (see https://stackoverflow.com/questions/37148592/redux-saga-hot-reloading#40783428 for the webpack equivalent) but there's some drawbacks to it which are mentioned briefly in the topic.

ps. I love the work you have done with ignite, the boilerplates and reactotron. They make for an awesome starting point and development toolkit!

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

[Discussion] Feature based architecture + Styled-Components

Hello!

First off, used this boilerplate for a handful of projects and I am loving it. One thing though, I often find myself re-factoring the boilerplate a bit to work with a more feature based architecture that looks more like this:

Components
-- {ComponentName}
-- {ComponentName}.component.js
-- {ComponentName}.redux.js

etc..

what are your thoughts on this? Wanted to get an idea before incase I go off and make my own boilerplate for this.

As a bonus, what are your thoughts on styled-components? This has also been working quite well for me in projects.

Cheers and thanks again for this awesomeness!

Refine walkthrough process & improve Next Steps

During the walkthrough process, we ask a series of questions, but they're not very well thought through at this point. Let's focus the walkthrough on being a beginner-friendly selection of options.

In addition, let's build out a much better / nicer Next Steps screen once the project is done generating. Include:

• What was generated?
• How do I learn about the structure & tools available in the generated app?
• What are my next steps?
• What plugins are available to add?

AIDL is missing

Hello !

Today, I start new project with ignite and vector-icons as dependency.
But when I launch yarn android:build in bash, I get this:

[...]
:react-native-vector-icons:compileReleaseAidl FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-vector-icons:compileReleaseAidl'.
> java.lang.IllegalStateException: aidl is missing

So, I try on windows CLI

[...]
:app:generateReleaseResources
:app:mergeReleaseResources
:app:bundleReleaseJsAndAssets

FAILURE: Build failed with an exception.

* What went wrong:
Failed to capture snapshot of input files for task 'bundleReleaseJsAndAssets' during up-to-date check.
> java.io.FileNotFoundException: C:\Users\NSA\Documents\Lab\BigBrowser\node_modules\.bin\format-json (can't open / access file)

I don't know if I should open issue on react-native repo...
So for the moment ... I can't build my project... PLEASE HELP ME !


I use the latest ignite CLI with RN 0.45.1 for features reasons

Bump version?

Hey guys,

Since #100 and #109 fixed some important problems can someone update the package here and on npm? I need to start a few new projects for my company and this would speed the project creation proces up alot :)

react-router-navigation or react-native-navigation

First of all thank you so much for such a nice boilerplate setup!!!

Was wondering if there is an upcoming change in navigation ?
Do you plan to maybe have another branch with different navigations and templates for rendering screen for each type of navigation?

Integration tests creating githooks error

After running integration tests, the following error spits out when running git commands:

line 18: cd: IntegrationTest/IntegrationTest: No such file or directory

There's an error for each hook, so on commit, it spits out:

.git/hooks/pre-commit: line 18: cd: IntegrationTest/IntegrationTest: No such file or directory
.git/hooks/prepare-commit-msg: line 18: cd: IntegrationTest/IntegrationTest: No such file or directory
.git/hooks/commit-msg: line 18: cd: IntegrationTest/IntegrationTest: No such file or directory
.git/hooks/post-commit: line 18: cd: IntegrationTest/IntegrationTest: No such file or directory
.git/hooks/post-rewrite: line 18: cd: IntegrationTest/IntegrationTest: No such file or directory

It doesn't seem to block the git action, (i.e. Still able to commit and push successfully).

Unhandled JS Exception: console.tron.overlay is not a function

When running a release build on my device, I get the following exception:

Unhandled JS Exception: console.tron.overlay is not a function. (In 'console.tron.overlay(f)', 'console.tron.overlay' is undefined

This causes the app to terminate, due to Reactotron not being available in non-DEV builds. Other tron functions are not affected because they are mocked in ReactotronConfig.

I solved this temporarily by removing the overlay in App.js and using the unmodified App instead of AppWithBenefits.

StoriesTest.js fails from missing dependency

From a fresh minimal app, after #138, all tests pass except StoriesTest.js with:

ignite new IgniteSampleApp --min
npm run test
...
 FAIL  Tests/StoriesTest.js
  ● Test suite failed to run
Cannot find module 'react-native-vector-icons/FontAwesome' from 'SearchBar.js'

Running yarn add react-native-vector-icons makes the generated tests pass, but I wasn't sure if you wanted to add a dependency or remove SearchBar because it's not used. It is a nice example though.

I tried ignite add vector-icons but that has an issue of its own #137

Storybooks missing from new project

I created a new project without any plugins and it's missing storybook files mentioned in README.MD. Is there something I need to do to have these included?

It's still using AVA app generated with ignite new MyApp -b ir-next

Hi,
great job you're doing here!
Just wanted to ask, when I run ignite new MyApp -b ir-next I still end up with AVA test setup altough I can see that here in the repo you've already moved to Jest.

I'll end up with this package.json:

{
  "name": "MyApp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "lint": "standard --verbose | snazzy",
    "lintdiff": "git diff --name-only --cached --relative | grep '\\.js$' | xargs standard | snazzy",
    "fixcode": "standard --fix",
    "clean": "rm -rf $TMPDIR/react-* && watchman watch-del-all && npm cache clean",
    "clean:android": "cd android/ && ./gradlew clean && cd .. && react-native run-android",
    "newclear": "rm -rf $TMPDIR/react-* && watchman watch-del-all && rm -rf ios/build && rm -rf node_modules/ && npm cache clean && npm i",
    "test": "ava",
    "test:watch": "ava --watch",
    "coverage": "nyc ava && nyc report --reporter=html && open coverage/index.html || xdg-open coverage/index.html",
    "android:build": "cd android && ./gradlew assembleRelease",
    "android:install": "cd android && ./gradlew assembleRelease && ./gradlew installRelease",
    "android:hockeyapp": "cd android && ./gradlew assembleRelease && puck -submit=auto app/build/outputs/apk/app-release.apk",
    "android:devices": "$ANDROID_HOME/platform-tools/adb devices",
    "android:logcat": "$ANDROID_HOME/platform-tools/adb logcat *:S ReactNative:V ReactNativeJS:V",
    "android:shake": "$ANDROID_HOME/platform-tools/adb devices | grep '\\t' | awk '{print $1}' | sed 's/\\s//g' | xargs -I {} $ANDROID_HOME/platform-tools/adb -s {} shell input keyevent 82",
    "precommit": "npm run git-hook",
    "prepush": "npm run git-hook",
    "git-hook": "npm run lint -s && npm test -s"
  },
  "dependencies": {
    "apisauce": "^0.10.0",
    "format-json": "^1.0.3",
    "lodash": "^4.17.2",
    "querystringify": "0.0.4",
    "ramda": "^0.23.0",
    "react": "~15.4.1",
    "react-native": "0.42.0",
    "react-native-config": "^0.2.1",
    "react-native-device-info": "^0.10.0",
    "react-native-drawer": "^2.3.0",
    "react-native-i18n": "^1.0.0",
    "react-native-vector-icons": "^4.1.1",
    "react-navigation": "^1.0.0-beta.9",
    "react-redux": "^5.0.2",
    "redux": "^3.6.0",
    "redux-persist": "^4.1.0",
    "redux-saga": "^0.14.3",
    "reduxsauce": "0.4.1",
    "seamless-immutable": "^7.0.1"
  },
  "devDependencies": {
    "ava": "^0.18.2",
    "babel-eslint": "^7.1.1",
    "babel-preset-es2015": "^6.18.0",
    "enzyme": "^2.6.0",
    "husky": "^0.13.1",
    "ignite-dev-screens": "^2.0.0-beta.9",
    "ignite-i18n": "^0.1.1",
    "ignite-ir-next": "^0.0.7",
    "ignite-vector-icons": "^0.2.1",
    "mockery": "^2.0.0",
    "nyc": "^10.1.2",
    "react-addons-test-utils": "^15.3.1",
    "react-dom": "^15.4.0",
    "react-native-mock": "^0.3.1",
    "reactotron-apisauce": "^1.7.0",
    "reactotron-react-native": "^1.7.0",
    "reactotron-redux": "^1.7.0",
    "reactotron-redux-saga": "^1.7.0",
    "snazzy": "^6.0.0",
    "standard": "8.6.0"
  },
  "ava": {
    "files": [
      "Tests/**/*.js",
      "!Tests/Setup.js"
    ],
    "require": [
      "babel-register",
      "babel-polyfill",
      "react-native-mock/mock",
      "./Tests/Setup"
    ],
    "babel": "inherit"
  },
  "standard": {
    "parser": "babel-eslint",
    "globals": [
      "describe",
      "it",
      "fetch",
      "navigator",
      "__DEV__",
      "XMLHttpRequest",
      "FormData",
      "React$Element"
    ]
  },
  "config": {
    "ghooks": {
      "pre-commit": "if [ -d 'ignite-base' ]; then cd ignite-base; fi; npm run lint"
    }
  }
}

The filename, directory name, or volume label syntax is incorrect error

I get this error after adding the boilerplate when creating a new ignite app:

The filename, directory name, or volume label syntax is incorrect.
The filename, directory name, or volume label syntax is incorrect.
The filename, directory name, or volume label syntax is incorrect.
The filename, directory name, or volume label syntax is incorrect.
The filename, directory name, or volume label syntax is incorrect.
an error occured while installing ignite-ir-boilerplate boilerplate.
Error: not found: git

Listview sections generator naming

The generator for the ListView sectioned screen doesn't rename the class to what we provide it, it's still ListviewSectionsExample in the file, even though the filename is what it should be (user provided). If I generate a Listview that does NOT use sections, those boilerplate containers are class named properly.

White flash on transition

I got this boilerplate setup with CRNA and it's working great! Thanks.

I do see a white flash, seems to be loading styles like bg color later in the render, so the initial page load starts with a white bg. Tested a greenfield bootstrap install in the ios emulator and did not see that issue. Wondering if it's a CRNA thing or maybe expo?

Thanks!

console error: "uncaught at check", "call argument fn is undefined"

After i delete whole node_modules folder, i exec npm install --save & react-native run-ios again, i get this result

image

System
  platform           darwin                                                                                                 
  arch               x64                                                                                                    
  cpu                4 cores                                            Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz  
  directory          /Users/sooxiaotong/Documents/ReactNative/Igniter                                                       

JavaScript
  node               8.4.0        /usr/local/bin/node  
  npm                5.3.0        /usr/local/bin/npm   
  yarn               0.27.5       /usr/local/bin/yarn  

React Native
  react-native-cli   2.0.1       
  app rn version     0.47.2      

Ignite
  ignite             2.0.0        /usr/local/bin/ignite  

Android
  java               1.8.0_121    /usr/bin/java                           
  android home       -            /Users/sooxiaotong/Library/Android/sdk  

iOS
  xcode              8.3.3 

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

nodeHandle?nodeHandle:nodeHandle.getHostNode()

When running yarn run test
The following exception gets thrown:

 RUNS  Tests/StoriesTest.js
IgniteBoilerplate/node_modules/react-native/Libraries/Renderer/ReactNativeStack-dev.js:2324
return null==nodeHandle||"number"==typeof nodeHandle?nodeHandle:nodeHandle.getHostNode();
                                                                           ^

TypeError: nodeHandle.getHostNode is not a function
    at findNumericNodeHandleStack (IgniteBoilerplate/node_modules/react-native/Libraries/Renderer/ReactNativeStack-dev.js:2324:76)
    at Component.focus (IgniteBoilerplate/node_modules/react-native/Libraries/Renderer/ReactNativeStack-dev.js:2553:31)
    at Component.<anonymous> (IgniteBoilerplate/node_modules/react-timer-mixin/TimerMixin.js:18:16)
    at ontimeout (timers.js:469:11)
    at tryOnTimeout (timers.js:304:5)
    at Timer.listOnTimeout (timers.js:264:5)
error Command failed with exit code 1.

Thats for the fresh ignite project setup that I did by running:

ignite new IgniteBoilerplate

ignite doctor output:

System
  platform           darwin
  arch               x64
  cpu                4 cores                                                            Intel(R) Core(TM) i5-5287U CPU @ 2.90GHz
  directory          /Documents/IgniteBoilerplate

JavaScript
  node               8.4.0        /usr/local/bin/node
  npm                5.3.0        /usr/local/bin/npm
  yarn               0.27.5       /usr/local/bin/yarn

React Native
  react-native-cli   2.0.1
  app rn version     0.47.2

Ignite
  ignite             2.0.0        /usr/local/bin/ignite

Android
  java               1.8.0_92     /usr/bin/java
  android home       -            /Documents/AndroidSDK

iOS
  xcode              8.3.3

👍 👍 👍 👍 👍 Once again thank you so much for such a great structure of components, and really useful real world examples that come with this boilerplate 👍 👍 👍 👍 👍

Enzyme 3.0 Baby -- Let's Get This Back!

Once #118 lands let’s delete all traces of enzyme.

Oh snap! Hold your horses! Looks like Enzyme 3 is here now that React 16 landed. Let's do some research and bring it back.

Generate screen

$ ignite generate screen Activity

✔︎ App/Containers/ActivityScreen.js
✔︎ App/Containers/Styles/ActivityScreenStyle.js
vvv -----[ DEBUG ]----- vvv
Error: 'import { StackNavigator } from' was not found in file ./App/Navigation/AppNavigation.js.
    at Object.insertInFile (/Users/rwoverdijk/.nvm/versions/node/v7.8.0/lib/node_modules/ignite-cli/src/extensions/patching.js:31:33)
    at Object.patchInFile (/Users/rwoverdijk/.nvm/versions/node/v7.8.0/lib/node_modules/ignite-cli/src/extensions/ignite/patchInFile.js:44:16)
    at Object.module.exports [as run] (./node_modules/ignite-ir-next/commands/screen.js:48:12)
    at process._tickCallback (internal/process/next_tick.js:109:7)
    at Module.runMain (module.js:607:11)
    at run (bootstrap_node.js:423:7)
    at startup (bootstrap_node.js:147:9)
    at bootstrap_node.js:538:3
^^^ -----[ DEBUG ]----- ^^^

Which makes sense. I implemented Redux in my app (sort of, still trying) so the import line looks like this:

import {StackNavigator, addNavigationHelpers} from 'react-navigation';

If this is regex, maybe just look for from 'react-navigation'; instead. It doesn't matter what gets imported.

Switching from AVA to Jest

There's been a lot of talk about this here, in a few other tickets and now in Slack.

Let's switch to Jest for our React Native projects (even though I love AVA and will still use it everywhere else -- including any ignite plugins I write).

React Native seems to have standardized on Jest and seems a bit against the grain to stay with AVA here.

Can we get consensus on this? We've got some contributors ready to mobilize and we need to make this decision.

/cc @jamonholmgren @GantMan

Missing examples

How can I access the components from ignite/Examples/Containers/ignite-ir-boilerplate (SectionExample.js etc) directly from the dev screens? Also it looks like the sagas examples are missing as well.
Why the boilerplate has much less examples than ignite v1?

Redux-persist with combined reducers

My root reducer looks like this:

  const rootReducer = combineReducers({
    app: require('./AppRedux').reducer,
    auth: require('./AuthRedux').reducer,
    services: combineReducers({
      reducer1: require('./Key1Redux').reducer,
      reducer2: require('./Key2Redux').reducer
    }),

if I add servicesinto the whitelist of persist-redux, i get the following error:

console.error: "Unexpected key "mergeDeep" found in previous state received by the reducer. Expected to find one of the known reducer keys instead: "reducer1", "reducer2". Unexpected keys will be ignored."

What is the correct way to make servicespersistent?

Plans for globalizing actions via bindActionCreators?

I've seen the redux pattern in other projects where mapDispatchToProps is bound to all action creators through bindActionCreators... That way, it's one less thing to define in each container. For example, we'd add to a container:

import { bindActionCreators } from 'redux';
import { ActionCreators } from '../Redux';

const mapDispatchToProps = (dispatch) => {
    return bindActionCreators(ActionCreators,dispatch);
}

And Redux/index.js would also have (as an example):

import ProductActions from './ProductRedux'
import BusinessActions from './BusinessRedux'

export const ActionCreators = Object.assign({}, // This needs to be defined
  ProductActions,
  BusinessActions
)

Each reducer already exports Creators extracted from createActions(), so it seems logical to take that one step further.

Storybook does not work

If I create a new project and try "npm run storybook" and browse to http://localhost:7007 I see the storybook app but no stories are listed. I would expect the two button stories, one with text, one with emojis.

On a related note, if I remove the storybook dirs from the project and do this:
npm install --global @storybook/cli
cd [your-app]
getstorybook
yarn run storybook

I get the expected storybook running on my device. However, now, trying react-native run-android, I get a red box saying "func is undefined". In other words, my app is corrupted.

I'd like to be able to use storybook during design but running it in a browser on my desktop to see styling. At some point I'd like to run it on device but that's less important. I'm new to RN so I could be missing something obvious but at the moment it does not look like I can use storybook in conjunction with the ignite boilerplate.

Npm install any module results in react-native is missing?

Hey,

Awesome stuff with ignite guys. I'm new to ignite and react and after installing the boilerplate, i'm trying to add firebase to the project by running npm install firebase. However, regardless of what I install it seems like all the modules in node_modules are no longer recognized. I then have to reinstall every module again by specifying npm install "module Name". I can't work out why this is happening ? Can anyone help ?

react-navigation + redux

react-navigation supports redux, but currently that's not implemented yet.

I just did this in a client project a few days ago, but it would be nice to land it in this boilerplate.

Here's a gist with the juicy parts. Next step is to roll this in by default.

Generator supporting subfolder structure

Any plans on supporting subfolders within the generators? Specifically, I am creating many small components all for one screen, while having several screens in my app. In the end I will probably have 30-40 components in my app, mainly to keep logic, styling, JSX, and testing more modularly. Specifically I'm using StorybookUI to refine my component designs/testing.

The App/Components folder is getting pretty cluttered and if I could run something like ignite g component Product/Review to generate App/Components/Product/Review.js (instead of App/Components/ProductReview.js), it would help with organization. The respective stylesheet would have to be put into the same respective subfolder under App/Components/Product/Styles/Review.js

LoginScreen.js file missing

LoginScreen.js - an example login screen. Read the comments in there to learn more!

I guess this is not relative to the newest version of the Boilerplate since a LoginScreen.js file doesn't exist. Is it moved somewhere else or you just totally removed it?

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.