title: Share common components between two react native applications
body: <p>I have an existing react native application with certain custom components I made. Now I'm trying to make a new application and use some of those components, so there's no need to copy/paste when changes occur. Let's name these applications app1 and app2. </p>
  
  <p>Here's what I tried:</p>
  
  <ol>
  <li>keeping the file structure 
  app1 =>
  src,
  node_modules,
  ios, etc</li>
  </ol>
  
  <p>app2 =>
     src,
     node_modules,
     ios, etc</p>
  
  <p>shared_folder =>
     components,
     node_modules</p>
  
  <p>that didn't work because the shared_folder needed node_modules to import react, react-native, etc. Npm complained of all the duplicate node modules it was looking at </p>
  
  <ol start="2">
  <li>Then I tried the structure </li>
  </ol>
  
  <p>app_folder =>
        node_modules,
        app1,
        app2,
        shared_folder</p>
  
  <p>That didn't work because when running npm start, it didn't know which index.ios.js to look for. Also, xcode for both app1 and app2 projects kept complaining about finding certain react files.</p>
  
  <p>My question is, what's the best way to structure these 2 applications so I can share certain components between them?</p>