react-native-threads icon indicating copy to clipboard operation
react-native-threads copied to clipboard

[Question] which RN version(s) is(are) supported yet?

Open omatrot opened this issue 5 years ago • 12 comments

Hi, this project seems to be what I need. I'm relying on native events from a native modules coming through the bridge at a high rate. In my application right now, processing those events is slowing down the UI. So I guess that offloading this to another JS engine instance makes sense. Is this module working with RN 0.57.4? Are we limited to strings exchanged in messages both ways? If so I guess I would have to stringify my objects. Thanks in advance.

omatrot avatar Mar 12 '19 14:03 omatrot

Hi, not the maintainer but I'm happy to answer. I found this to work in 0.57 and 0.58 (so assuming it'll work with 0.57.4). Looking at the native source code for this, it seems that we are indeed limited to strings.

cjroth avatar Mar 12 '19 16:03 cjroth

Also just tried it on 0.59.0 and it's working.

cjroth avatar Mar 12 '19 16:03 cjroth

Sorry should have said working on 0.59.0 for iOS. Have not tried other platforms yet.

cjroth avatar Mar 12 '19 17:03 cjroth

@cjroth does not compile for me on 0.57.4 for Android (latest version at least).

error: package com.facebook.react.jscexecutor does not exist

omatrot avatar Mar 13 '19 17:03 omatrot

Hmm is this the same thing? https://github.com/joltup/react-native-threads/issues/63

cjroth avatar Mar 13 '19 17:03 cjroth

Yep I managed to solve it going back to the previous version. A version matrix would be a plus.

omatrot avatar Mar 13 '19 17:03 omatrot

@cjroth can you please tell how are you initializing and command you used to build Thread.jsbundle Thread from your component in iOS as I tried the same and followed the instructions given but for me it going into infinite loading loop.

ghost avatar Mar 21 '19 16:03 ghost

@sja1n I experience an infinite load loop if I had the remote debugger turned on. I had to turn it off entirely while using threads and instead use Reactotron. To get around that in development I basically have my code able to run either in a thread or not in a thread, depending on whether or not I need to use the remote debugger. This worked elegantly by using Redux actions that basically can either dispatch to the thread or just to the regular store.

cjroth avatar Mar 25 '19 18:03 cjroth

oh yes, I was using remote debugging and disabling it off worked for me. Thanks @cjroth

ghost avatar Mar 26 '19 05:03 ghost

does anyone know if it's possible to get this to work without reverting to a previous version? I'm getting the same error (android) described in #63 with RN 0.57.8 and I'm kinda stuck with that version..

eharason avatar Apr 01 '19 21:04 eharason

Is this library compatible with react-native 0.60.4 ?

crubier avatar Aug 04 '19 14:08 crubier

@eharason downgrading mentioned in #63 means downgrading the version of react-native-threads not react-native.

besides, I make a brief summary table for this question according all information I find currently: (for future community members, pls feel free to complete this table according to your own test, so that lately we will have a more complete answer for this question.)

react-native version--------react-native-threads version--------platform--------reference/who tests 0.55.4--------0.0.13--------both--------react-native-threads/examples/SimpleExample/package.json

0.57.1--------0.0.15--------android--------@ChenhuaWANG22 0.57.4--------0.0.15--------android--------@omatrot 0.57.7--------0.0.15--------android--------@SokWonJeremyKim

0.57--------0.0.16--------iOS--------@cjroth 0.58--------0.0.16--------iOS--------@cjroth 0.59.0--------0.0.16--------iOS--------@cjroth

ChenhuaWANG22 avatar Sep 30 '19 08:09 ChenhuaWANG22