I'm following along with a tutorial and I just figured I'd ask (I get the feeling the answer is going to be no), but would route animations work in Snap?
I can't see why not. After react application being rehydrated it works like any other react application. But haven't tried myself
I've tried it and I can't get it to work with the setup as covered in the tut (with some modifications to make it work with the latest version of React Transition Group (which I've got working). When I add React Snap, the animations are gone.
I'm digging and found this:
https://github.com/zeit/next.js/issues/88#issuecomment-284693637
It seems like a common symptom.
I will try this example tomorrow https://github.com/maisano/react-router-transition. Or you can suggest yours
Here's the example I'm working with:
https://github.com/maisano/react-router-transition doesn't work out of the box it needs more time to be configured
As of your example, you are using React 15, but hydrate is the feature of React 16.
This code works:
import React from 'react';
import { render } from 'react-dom';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import './index.css';
const rootElement = document.getElementById('root');
render(<App />, rootElement);
registerServiceWorker();
The strange part is why create-react-app does not report an issue when code imports nonexistent symbol e.g. hydrate. Need to open issue in create-react-app tracker
just upgraded with yarn upgrade react@next react-dom@next and now I have another issue:
https://github.com/animatedjs/animated/issues/86
I will go back to 15 and use your fix for now :)
Thank you @stereobooster
Closing this as your fix worked!
Most helpful comment
I will try this example tomorrow https://github.com/maisano/react-router-transition. Or you can suggest yours