react-transmit icon indicating copy to clipboard operation
react-transmit copied to clipboard

Is react-transmit-native deprecated?

Open bdougie opened this issue 7 years ago • 2 comments

What is this?

Correct me if I am wrong but having a separate react-native library is not necessary since React Native now relies on React directly for its Component(CreateClass) API.

I only came to this conclusion when starting a project with the React Native version and got the below error when running tests. I have not looked at the internals as of yet, but assume the React Native library is looking for things that are no longer available in newer versions of React Native.

Currently using 0.39.2

    Seems you're trying to access 'ReactNative.createClass' from the 'react-native' package. Perhaps you meant to access 'React.createClass' from the 'react' package instead?
    
    For example, instead of:
    
      import React, { Component, View } from 'react-native';
    
    You should now do:
    
      import React, { Component } from 'react';
      import { View } from 'react-native';
    
    Check the release notes on how to upgrade your code - https://github.com/facebook/react-native/releases/tag/v0.25.1

bdougie avatar Jan 09 '17 07:01 bdougie

@RickWong open a PR for a README change. I tested it on my 0.40 app and it works.

bdougie avatar Feb 11 '17 16:02 bdougie

Just discovered that an unrelated dependency I used for testing, react-native-mock, actually helps react-transmit proper work with react-native.

Since react-transmit-native no longer works with newer versions of react-native. react-transmit needs react-dom, which is where react-native-mock comes in.

As an aside: I have been using this project as a basis for a talk I have given at local meetups and would love to continue to do so at a future conference. If there is anything I can assist with with, I would love to help out to keep this project going. I might poke around to more fo the source and see if I can commit to updating the DOCS.md

bdougie avatar Feb 14 '17 05:02 bdougie