import React from 'react';
import Router from 'react-router';
import UserActions from '../actions/UserActions';

var Logout = React.createClass({
  mixins: [Router.Navigation],

  componentWillMount() {
    UserActions.logout();
    this.transitionTo('login');
  },

  render() {
    return <div></div>;
  },
});

export default Logout;

import React from 'react';
import Router from 'react-router';
import UserActions from '../actions/UserActions';

var Logout = React.createClass({
  mixins: [Router.Navigation],

  componentWillMount() {
    UserActions.logout();
    this.transitionTo('login');
  },

  render() {
    return null;
  },
});

export default Logout;

Return `null` instead of empty `div` in the logout route.
Return `null` instead of empty `div` in the logout route.

Makes more sense.
