How to use the react-router-transition.presets.slideRight function in react-router-transition

To help you get started, we’ve selected a few react-router-transition examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github elevenbeans / TW2FS / public / javascripts / home / index.jsx View on Github external
var App = function({ children, location }) {
  styles = location.action === 'POP' ? presets.slideRight : presets.slideLeft;
  // console.log(location.action);
  return (
  <div>
    <header>

    
      {children}
    

  </header></div>
  );
};
github elevenbeans / we-voting / client / index.jsx View on Github external
const App = function({ children, location }) {
  styles = location.action === 'POP' ? presets.slideRight : presets.slideLeft;
  return (
    <div>
      <header>
      
        {children}
      
    </header></div>
  );
};
github cssinjs / cssinjs / src / components / App / index.js View on Github external
const getTransition = (location) => {
  let transition = presets.slideRight

  if (prevLocation && isAfter(prevLocation.pathname, location.pathname)) {
    transition = presets.slideLeft
  }

  prevLocation = location

  return transition
}

react-router-transition

A thin layer over react-motion for animating routes in react-router.

MIT
Latest version published 4 years ago

Package Health Score

53 / 100
Full package analysis