We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi I like the approach this library uses and I am trying to get it working in my own code, but I am getting the following error
Any Ideas what that error means? I am pretty new to react and this particular error doesnt give me much detail. My files look like:
import React from 'react'; import ReactDOM from 'react-dom'; import App from './components/App'; import Styles from './sass/styles.scss'; import {BrowserRouter} from 'react-router-dom'; import 'whatwg-fetch'; var json = [ { "name" : "one" }, { "name" : "two" }, { "name" : "three" }, { "name" : "four" }, { "name" : "five" }, { "name" : "six" } ]; ReactDOM.render( <BrowserRouter><App slides={json} /></BrowserRouter> , document.getElementById('root'));
import React, {PropTypes} from 'react'; import Slide from './Slide'; import {Link, Route, Router} from 'react-router-dom'; import {TransitionSwitch, TransitionRoute} from 'react-router-v4-transition'; export default class App extends React.Component { constructor(props){ super(props); this.state = { slides:props.slides, currentSlide:0, } } render() { return ( <div> <TransitionSwitch > {this.state.slides.map((slide)=> <Route path="/slide/:slideName" key={"route_"+ slide.name }> <Slide key={ slide.name } slideName={slide.name} className={"slide_"+slide.name} /> </Route> )} </TransitionSwitch> <div className='pagination'> <Link to={'/slide/one'} >go</Link> </div> </div> ); } }
import React, {PropTypes} from 'react'; import gsap from 'gsap'; export default class Slide extends React.Component { constructor(props){ super(props); } render() { return ( <div className={'slide '+this.props.className} ref="slideRoot"> {this.props.slideName} This is a slide </div> ); } componentWillEnter (cb){ console.log('willEnter'); TweenMax.set(this.refs.slideRoot, {transformOrigin:'50% 50%'}) TweenMax.fromTo( this.refs.slideRoot, 0.8, { x: 1000 , alpha: 0, scale:0 }, { x:"0", alpha: 1, scale:1, ease:Expo.easeInOut, onComplete: ()=>{ cb(); } } ); }; componentWillLeave (cb){ console.log(this.props.currentDelta); TweenMax.set(this.refs.slideRoot, {transformOrigin:'50% 50%'}) TweenMax.fromTo( this.refs.slideRoot, 0.8, { x:"0", alpha: 1, scale:1 }, { x: -1000 , alpha: 0, scale:0, ease:Expo.easeInOut, onComplete: ()=>{ cb(); } } ); }; }
The text was updated successfully, but these errors were encountered:
this seems to be the culprit: context is undefined. Any guess why that might be ?
context
Sorry, something went wrong.
I am seeing now that this relates to #13
#14 Fixed the issue. Need to pull that in!
#18 fixes it and will be published to the npm package today !
No branches or pull requests
Hi I like the approach this library uses and I am trying to get it working in my own code, but I am getting the following error
![image](https://user-images.githubusercontent.com/469038/35251709-708df00a-ffaa-11e7-96c0-0aa66a773f14.png)
Any Ideas what that error means? I am pretty new to react and this particular error doesnt give me much detail. My files look like:
index.js
app.js
app.js
The text was updated successfully, but these errors were encountered: