Skip to content
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.

Add support for react native environment #125

Merged
merged 21 commits into from
Feb 15, 2018

Conversation

bnjm
Copy link
Contributor

@bnjm bnjm commented Feb 12, 2018

Scope & Features

Design

  • Dynamic require calls can be made from node and react native environments as io3d.runtime.require('../module')
  • Runtime now checks for React Native

How to use

  • Dynamically require a module:
if (runtime.isNode) {
  return runtime.require('node-fetch')
}
  • check for React Native
io3d.runtime.isReactNative 
// -> boolean
  • These changes do not effect how existing consumers interact with 3dio-js

How to test

Notes

Edit: There are few unnecessary commits here as this was built off an earlier experiment in my fork, happy to squash these where possible.

@bnjm bnjm requested review from tomas-polach, AVGP and m-ke February 12, 2018 18:17
merge with master

merge with master

merge with master
@bnjm bnjm force-pushed the dynamic-require-alias branch from 941b59c to f35c9d4 Compare February 13, 2018 09:53
@bnjm
Copy link
Contributor Author

bnjm commented Feb 13, 2018

Attached issue: #89

Copy link
Contributor

@tomas-polach tomas-polach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! good to go from my side

@tomas-polach tomas-polach merged commit e9d7a0c into archilogic-com:master Feb 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants