Giter Site home page Giter Site logo

koderslab / react-native-for-web Goto Github PK

View Code? Open in Web Editor NEW
254.0 254.0 17.0 1.03 MB

A set of classes and react components to make work your react-native app in a browser. (with some limitations obviously)

License: MIT License

JavaScript 85.86% CSS 14.14%

react-native-for-web's People

Contributors

angelocala94 avatar chandu0101 avatar kyleamathews avatar mattiamanzati avatar respectthecode avatar vcarl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-for-web's Issues

Renaming the package

Yeah, it's the second time. I know.
The thing is that I don't want to compete or create misunderstanding with @necolas, since our two packages have a similar name but two different objectives.

The thing is: How to name it?
Right now my best choice is to roll back to react-native-web-polyfill, but I don't kinda like it because "Polyfill" is a discussed terminology, and as exposed in the readme, the objective of this library is not to replace react-native for ios or android.

What do you guys think about it?

Update npm and babel

I have tried to install react-native-for-web in an empty react native project and I am having some trouble with it.
My error is:

ERROR in ./index.ios.js
Module build failed: ReferenceError: [BABEL] /Users/tiagoferreira/Documents/projects/ryuutama/index.ios.js: Unknown option: base.optional

I am using node 5 and when I install the packages I get the following dependencies installed in the project:

"dependencies": {
    "react-native": "0.15.0"
  },
  "devDependencies": {
    "babel-core": "6.2.1",
    "babel-loader": "6.2.0",
    "babel-preset-es2015": "6.1.18",
    "react": "0.14.3",
    "react-dom": "0.14.3",
    "react-native-for-web": "0.1.7",
    "webpack": "1.12.9"
  }

This is my webpack.config

module.exports = {
  context: __dirname,
  entry: {
        'index.ios': ['./index.ios.js']
  },
  output: {
      path: __dirname + "/web",
      filename: "bundle.web.js"
  },
  // other webpack config
  resolve: {
    alias: {
      "react-native": "react-native-for-web"
    }
  },
  // setup the macro to resolve require("image!...")
  externals: [
    require("react-native-for-web/src/macro/image")
  ],
  module: {
        loaders: [
            { test: /\.js$/, loader: "babel-loader?optional[]=runtime&stage=1"}
        ]
  }
}

Performance of react-native-for-web

I'm curious if there are any performance bottlenecks that I might be able to help with. I've converted a large project that uses ReactJS to to React-Native-For-Web (changing div to View, input to TextInput, etc) and even without supporting styling I'm seeing a 46% speed hit.

I'm doing more profiling work to see if I can identify any issues.

If there are any known performance hits, let me know and I will see if I can contribute.

touchevents on Android

Touch event emulation seems to work only on certain types of android devices. Need to investigate more and fix this but atm I don't have enough devices to test this out.

Documentation

I'm new to webpack and am a little confused- is this tutorial supposed to show us how to start a new project, or work with the existing repo of examples? When I clone the repo and run npm install react-native-for-web, I get an error saying "Refusing to install react-native-for-web as a dependency of itself."

navigator ?

web version of react-navigator - https://github.com/bh5-js/react-navigator

can we add this as dependency and expose via react-native-for-web ?

or can we copy the source to navigator folder( ofc if author of bh-react-navigator agree only) ?

WDYT ..

btw in past you told me that you have something called router built on top navigator ,any plans to include that aswell ?

Component's re mounting for no reason

Hi

class Test extends Component {
     render() {
        console.log('render test')
    return (
      <TouchableOpacity onPress={() => console.log('ok clicked')}>
       <Text> Click Me! </Text>
      </TouchableOpacity>
    );
  }
  componentWillReceiveProps(nextProps) {
    console.log("next props")
  }
}
export default class App extends Component {
  render() {
    return (
      <View>
        <Text> Parent Text </Text>
       <Test name={'hello'}> </Test>
      </View>
    );
  }
}

In above example when i click on "Click Me!" then

Expected :

ok clicked

Actual :

next props
render test
ok clicked

If i remove <Text> Parent Text </Text> from app then onPress is giving expected results looks like having more than one children is the issue(critical one)! ,

Support for NativeModules

Is it possible to currently mock the NativeModules so that they don't throw errors such as these:

Uncaught TypeError: Cannot read property 'RNVectorIconsManager' of undefined

I don't want them to do anything, just, be able to run the app without errors. Is there an alias I can setup for this or something? Not using it personally but one of the packages I use uses it

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.