GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - HBandesh/reusingCode: This POC is intended to demonstrate an approach to reuse the code between React and React Native.

BranchesTags
Open more actions menu

Latest commit

 

History

12 Commits
12 Commits

Folders and files

NameName
Last commit message
Last commit date
actions/ThanosHitButton
actions/ThanosHitButton
 
 
app/components
app/components
 
 
assets
assets
 
 
constants/ThanosHitButton
constants/ThanosHitButton
 
 
platform
platform
 
 
reducers/ThanosHitButton
reducers/ThanosHitButton
 
 
web
web
 
 
webpack
webpack
 
 
.eslintrc
.eslintrc
 
 
.gitignore
.gitignore
 
 
App.js
App.js
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
app.json
app.json
 
 
babel.config.js
babel.config.js
 
 
index.web.js
index.web.js
 
 
initializeStore.js
initializeStore.js
 
 
package.json
package.json
 
 
webpack.config.js
webpack.config.js
 
 

Repository files navigation

resuingCode

Projects often fall into a scenario where they need to make a platform which can be reused both in React (for website) and React Native (for mobile Apps). This question of reusing code between the two is, in fact, one of the hot topics among React and React native developers all over the world. The approach which I am going to take is based on the fact that React Native can load platform specific Javascript modules based on their extensions.

I have made this application as an example of my article "https://codeburst.io/reusing-code-between-react-js-and-react-native-effectively-12bb4fbf7a70". You can read more about the concept and approach in the blog.

Installation

  1. Run npm install.
  2. Install the Expo client app on your iOS or Android phone.

Running

  1. For web -> Run 'npm start'

  2. For Mobile App -> a. Run 'npm run app'. b. Install the Expo client app on your iOS or Android phone and connect to the same wireless network as your computer. On Android, use the Expo app to scan the QR code from your terminal to open your project. On iOS, follow the on-screen instruction to get a link.

Screenshots

WEB:

alt text

App:

alt text

About

This POC is intended to demonstrate an approach to reuse the code between React and React Native.

Topics

code-reusecode-sharecode-sharingreactreact-native

Resources

Readme
MIT license
Activity

Stars

53 stars

Watchers

1 watching

Forks

31 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.