-
Notifications
You must be signed in to change notification settings - Fork 1.3k
React-native #76
Comments
Not sure, good question! There's nothing web-specific to Recompose, so it should work, but I haven't confirmed. |
Currently it doesn't because it imports module But my guess is that it will start working after facebook/react-native#2985 is resolved. |
facebook/react-native#2985 is now resolved. |
Just waiting for a release :) |
This doesn't seem to be working still (or now?):
I'm using the following versions:
|
@rclai I got it working by removing my
|
I don't have a Edit: Oh never mind, I had to restart the packager. |
Unfortunately react-native has a problem when using the official So instead of import { compose, lifecycle, withState, branch, renderComponent } from 'recompose'; you would have to do import compose from 'recompose/compose';
import lifecycle from 'recompose/lifecycle';
import withState from 'recompose/withState';
import branch from 'recompose/branch';
import renderComponent from 'recompose/renderComponent'; |
The reason why it's not currently working in React Native is because of acdlite/change-emitter#2. As soon as that is published, it will work. |
The fix has been waiting on the master branch for 6 (SIX) months. What are you waiting for? ping @acdlite |
@Minishlink, I'm sure that @acdlite is extremely busy with his work and given that he is a a contributor to various OSS projects probably has notifications turned off. 😕 I tried pinging him on Twitter a few months back but that didn't help at the time. Maybe we can ping him again? |
For now I've fallen back to having a small script that patches the |
@migueloller Sure, let's ping him on Twitter. By the way, I found a way to circumvent the problem by adding |
@Minishlink, I just reached out via Twitter and it was released! 🙌 Thanks @acdlite! |
@migueloller Does this fix your issue? Not for me. :/ |
@Minishlink have you tried clean npm install? I think dependency should be updated even without |
@istarkov I did a |
Updated package still fails with |
@Minishlink and @prontiol, I looked into this and it seems that because the package still published a |
Same issue here. |
Any quick fix for this until the package is published? |
@pbassut, yes. Simply delete |
Thanks @migueloller! |
recompose issue acdlite/recompose#76
Guys I've fixed change-emitter and seems like recompose reinstall should fix a problem |
@istarkov, thanks! I also saw that you have another PR in there (acdlite/change-emitter#7). If you merge the PR that I had made previously (acdlite/change-emitter#5) that would fix that issue as well by using |
@migueloller I'm reading what is |
I'm completely new to this library and I tried installing it tonight (through a react-native app). I started to get very excited about it... except that functions do not seem to be passed through. I just installed it and I just created this app through
returns only |
Is any rn playground exists like https://snack.expo.io but with ability to import npm modules? |
@istarkov not that i'm aware of. Just googled around for one. I can create a barebones github project if you want. it shouldn't be that hard to run if you have a mac |
I will create it myself, not a big problem. |
I've just created react-native example, all works as expected |
@istarkov ok i see where my problems are and it is in fact working as expected! I had originally had the following code and the issue was that
But that lead me to log what was being passed as a function in the render phase... unfortunately, react-native logs functions as null which caused my confusion :_( They don't even show up as a property on an object when logged. Anyways, I'm really excited to use this library and transform the way i currently write code! Thanks a lot! |
@laxgoalie392 thank you, now I know how to create and test react-native with recompose ;-) |
Does the library work with react-native?
The text was updated successfully, but these errors were encountered: