Coder Social home page Coder Social logo

Transitions about universal-router HOT 11 OPEN

kriasoft avatar kriasoft commented on May 8, 2024
Transitions

from universal-router.

Comments (11)

frenzzy avatar frenzzy commented on May 8, 2024 2

Are these examples useful to you?

from universal-router.

frenzzy avatar frenzzy commented on May 8, 2024 1

Do not use any higher order components with ReactTransitionGroup, for example you can manually apply styles for your animation component:

import React from 'react';
import s from './your.css';

class Animation extends React.Component {
  static contextTypes = {
    insertCss: PropTypes.func,
  };

  componentWillMount() {
    this.removeCss = this.context.insertCss.apply(undefined, s);
  }

  componentWillUnmount() {
    setTimeout(this.removeCss, 0);
  }
  // ...
}

Or you can read discussion here: reduxjs/react-redux#303

from universal-router.

SeverS avatar SeverS commented on May 8, 2024

+1

from universal-router.

puradox avatar puradox commented on May 8, 2024

+1

from universal-router.

 avatar commented on May 8, 2024

+1

from universal-router.

Edmondton avatar Edmondton commented on May 8, 2024

👍

from universal-router.

Edmondton avatar Edmondton commented on May 8, 2024

@frenzzy - it does help. thanks. any possible way to include them in the README or in some form of documentation.

from universal-router.

koistya avatar koistya commented on May 8, 2024

universal-router
https://twitter.com/koistya/status/741023710249914368

from universal-router.

sinnwell avatar sinnwell commented on May 8, 2024

I'm trying to make something similar work using react-addons-transition-group to be able to code custom animations. Unfortunately widthStyles(s)(Component) does not pass through componentWillEnter(callback) and componentWillLeave(callback). Any tips?
This did not help me:
kriasoft/react-starter-kit#909 (comment)

from universal-router.

SeverS avatar SeverS commented on May 8, 2024

@sinnwell can you provide a fiddle? if you tried that solution from the comment it should have worked... i assume that the problem is somewhere else...

from universal-router.

sinnwell avatar sinnwell commented on May 8, 2024

@SeverS

This is working. With ReactTransitionGroup.
https://jsfiddle.net/sinnwell/7u9tvrkb/13/

But using isomorphic-style-loader (copied the source and dependencies of withStyle)
https://jsfiddle.net/sinnwell/qqdatpj5/10/

The callback methods of the Animation component won't be called any longer.

from universal-router.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.