Working with components - gabrielrangel95/react-native-folder-structure GitHub Wiki

Exporting:

index.tsx

import * as React 'react'
import styles from './styles'

class MyComponent extends React.Component {

  render(){
    return(
      <MyView />
    )
  }
}

export { MyComponent };

index.tsx

import * as React from 'react'
const MyStatelessFunctionalComponent = (props: IProps) =>{
  return(
     <MyView/>
  )
}

export { MyStatelessFunctionalComponent}

style.ts

import styled from 'styled-components-native' export const MyView = styled.View``;

⚠️ If a component has a subcomponent, it should be inside of the own component folder

⚠️ **GitHub.com Fallback** ⚠️