-
Notifications
You must be signed in to change notification settings - Fork 649
Description
I've found that I can use ReactTransitionGroup in a React Native app without problems. @yachaka said here facebook/react-native#9321 that it's really slow but I haven't confirmed that yet, it seems to run fine.
This seems like a useful utility that could pretty easily be offered up to the React Native community.
There are only 2 issues holding it up that I found. One is the DOM reliances in the npm package that prevent it from being installed in a standard RN project:
├── UNMET PEER DEPENDENCY react@^15.0.0
├── UNMET PEER DEPENDENCY react-dom@^15.0.0
└─┬ react-transition-group@1.0.0
└── dom-helpers@3.2.0
npm WARN react-transition-group@1.0.0 requires a peer of react@^15.0.0 but none was installed.
npm WARN react-transition-group@1.0.0 requires a peer of react-dom@^15.0.0 but none was installed.
npm WARN 3rdParty No description
npm WARN 3rdParty No repository field.
npm WARN 3rdParty No README data
npm WARN 3rdParty No license field.
To get around that temporarily I cloned this repo and pasted these files into my project:
And secondly the default of 'span'
means you need to pass component={View}
.
<ReactTransitionGroup component={View}>
{this.state.showLogo &&
<AnimatedLogo key='logo' onPress={this.handleLogoPress}/>
}
</ReactTransitionGroup>
Even without solving for the View issue, it would be handy to come up with a way to make this library easily installable for React Native, perhaps just via some npm magic?