Giter Club home page Giter Club logo

ignite_first_app's Introduction

<<<<<<< HEAD

logo

Command line to generate ignite project with expo and browser ignite ( no issues)

npx ignite-cli new PizzaApp -b bowser --expo

APP SCREENS

APP PROFILE VIEW

TABS VIEW

FETCH API

TEST with JEST

TODO with HOOKS

TODO with MST

TODO with MST & ignite browser

FETCH USERS

PizzaApp

CircleCI

The latest and greatest boilerplate for Infinite Red opinions

This is the boilerplate that Infinite Red uses as a way to test bleeding-edge changes to our React Native stack.

Currently includes:

  • React Native
  • React Navigation
  • MobX State Tree
  • TypeScript
  • And more!

Quick Start

The Ignite Bowser boilerplate project's structure will look similar to this:

Ignite_first_app

The Ignite boilerplate project's structure will look similar to this:

4ddf47c018c99300b053fe98ea37d5621cefc747

ignite-project
├── app
│   ├── components
│   ├── i18n
│   ├── utils
│   ├── models
<<<<<<< HEAD
│   ├── navigation
=======
│   ├── navigators
>>>>>>> 4ddf47c018c99300b053fe98ea37d5621cefc747
│   ├── screens
│   ├── services
│   ├── theme
│   ├── app.tsx
├── storybook
│   ├── views
│   ├── index.ts
│   ├── storybook-registry.ts
│   ├── storybook.ts
<<<<<<< HEAD
=======
│   ├── toggle-storybook.tsx
>>>>>>> 4ddf47c018c99300b053fe98ea37d5621cefc747
├── test
│   ├── __snapshots__
│   ├── storyshots.test.ts.snap
│   ├── mock-i18n.ts
│   ├── mock-reactotron.ts
│   ├── setup.ts
│   ├── storyshots.test.ts
├── README.md
<<<<<<< HEAD
├── ignite
│   ├── ignite.json
│   └── plugins
├── App.js
=======
├── android
│   ├── app
│   ├── build.gradle
│   ├── gradle
│   ├── gradle.properties
│   ├── gradlew
│   ├── gradlew.bat
│   ├── keystores
│   └── settings.gradle
├── ignite
│   ├── ignite.json
│   └── plugins
├── index.js
├── ios
│   ├── IgniteProject
│   ├── IgniteProject-tvOS
│   ├── IgniteProject-tvOSTests
│   ├── IgniteProject.xcodeproj
│   └── IgniteProjectTests
>>>>>>> 4ddf47c018c99300b053fe98ea37d5621cefc747
├── .env
└── package.json

./app directory

Included in an Ignite boilerplate project is the app directory. This is a directory you would normally have to create when using vanilla React Native.

The inside of the src directory looks similar to the following:

app
│── components
│── i18n
├── models
<<<<<<< HEAD
├── navigation
=======
├── navigators
>>>>>>> 4ddf47c018c99300b053fe98ea37d5621cefc747
├── screens
├── services
├── theme
├── utils
└── app.tsx

<<<<<<< HEAD

components This is where your React components will live. Each component will have a directory containing the .tsx file, along with a story file, and optionally .presets, and .props files for larger components. The app will come with some commonly used components like Button.

i18n This is where your translations will live if you are using react-native-i18n.

models This is where your app's models will live. Each model has a directory which will contain the mobx-state-tree model file, test file, and any other supporting files like actions, types, etc.

navigation This is where your react-navigation navigators will live.

screens This is where your screen components will live. A screen is a React component which will take up the entire screen and be part of the navigation hierarchy. Each screen will have a directory containing the .tsx file, along with any assets or other helper files.

services Any services that interface with the outside world will live here (think REST APIs, Push Notifications, etc.).

theme Here lives the theme for your application, including spacing, colors, and typography.

utils This is a great place to put miscellaneous helpers and utilities. Things like date helpers, formatters, etc. are often found here. However, it should only be used for things that are truely shared across your application. If a helper or utility is only used by a specific component or model, consider co-locating your helper with that component or model.

app.tsx This is the entry point to your app. This is where you will find the main App component which renders the rest of the application. This is also where you will specify whether you want to run the app in storybook mode.

./ignite directory

The ignite directory stores all things Ignite, including CLI and boilerplate items. Here you will find generators, plugins and examples to help you get started with React Native.

./storybook directory

This is where your stories will be registered and where the Storybook configs will live

./test directory

This directory will hold your Jest configs and mocks, as well as your storyshots test file. This is a file that contains the snapshots of all your component storybooks.

Running Storybook

From the command line in your generated app's root directory, enter yarn run storybook This starts up the storybook server.

In App.js, change SHOW_STORYBOOK to true and reload the app. For Visual Studio Code users, there is a handy extension that makes it easy to load Storybook use cases into a running emulator via tapping on items in the editor sidebar. Install the React Native Storybook extension by Orta, hit cmd + shift + P and select "Reconnect Storybook to VSCode". Expand the STORYBOOK section in the sidebar to see all use cases for components that have .story.tsx files in their directories.

Previous Boilerplates

Premium Support

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

4ddf47c018c99300b053fe98ea37d5621cefc747

ignite_first_app's People

Contributors

hafdiahmed avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

ignite_first_app's Issues

Drawer react native cant swipe or gesture

here is my code

import React from "react"
import { observer } from "mobx-react-lite"
import { View, ViewStyle } from "react-native"
import { Button, Screen, Text } from "../../components"
import { useNavigation } from "@react-navigation/native"
// import { useStores } from "../../models"
import { color } from "../../theme"
import { NavigationContainer } from '@react-navigation/native';
import { createDrawerNavigator, DrawerContentScrollView, DrawerItem } from '@react-navigation/drawer';//import { DrawerNavigator } from "react-navigation"
import 'react-native-gesture-handler';

import { createStackNavigator } from '@react-navigation/stack';

const ROOT: ViewStyle = {
  backgroundColor: color.palette.black,
  flex: 1,
}
 


function HomeScreen({ navigation }) {
  return (
    <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
      <Button
        onPress={() => navigation.navigate('Notifications')}
        text="Go to notifications"
      />
    </View>
  );
}

function NotificationsScreen({ navigation }) {
  return (
    <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
      <Button onPress={() => navigation.goBack()} text="Go back home" />
    </View>
  );
}
const Drawer = createDrawerNavigator();
const Stack = createStackNavigator();


function MyDrawer() {
  return (
    <Drawer.Navigator initialRouteName="Home"
      
    >
      <Drawer.Screen name="Home" component={HomeScreen} />
      <Drawer.Screen name="Notifications" component={NotificationsScreen} 
     
      />
    </Drawer.Navigator>
  );
}

export const DrawerScreen = observer(function DrawerScreen() {
  // Pull in one of our MST stores
  // const { someStore, anotherStore } = useStores()

  // Pull in navigation via hook

  //onst navigation = useNavigation()

  
  return (
  <Screen style={ROOT}>
     <NavigationContainer>
       <MyDrawer/>
     </NavigationContainer>
     
  </Screen>
  )
})

You don't seem to have a generator with the name “react-native-ignite:model” installed.

You don't seem to have a generator with the name “react-native-ignite:model” installed.
But help is on the way:

You can see available generators via npm search yeoman-generator or via http://yeoman.io/generators/.
Install them with npm install generator-react-native-ignite.

To see all your installed generators run yo without any arguments. Adding the --help option will also show subgenerators.

If yo cannot find the generator, run yo doctor to troubleshoot your system.

'CI' n'est pas reconnu en tant que commande interne & 'yo' n’est pas reconnu en tant que commande interne

'CI' n'est pas reconnu en tant que commande interne
ou externe, un programme ex�cutable ou un fichier de commandes.
Generate a new model named product
'yo' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.
events.js:377
throw er; // Unhandled 'error' event
^

Error: spawn yo ENOENT
at notFoundError (C:\Users\ahafdi\AppData\Roaming\npm\node_modules\react-native-ignite\node_modules\cross-spawn\lib\enoent.js:11:11)
at verifyENOENT (C:\Users\ahafdi\AppData\Roaming\npm\node_modules\react-native-ignite\node_modules\cross-spawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit (C:\Users\ahafdi\AppData\Roaming\npm\node_modules\react-native-ignite\node_modules\cross-spawn\lib\enoent.js:33:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess.cp.emit (C:\Users\ahafdi\AppData\Roaming\npm\node_modules\react-native-ignite\node_modules\cross-spawn\lib\enoent.js:36:37)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn yo'
}

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.