Skip to content

Instantly share code, notes, and snippets.

@mix5003
Created December 11, 2016 13:37
Show Gist options
  • Select an option

  • Save mix5003/0d42b16e830abdb12d4a4e67729aec3b to your computer and use it in GitHub Desktop.

Select an option

Save mix5003/0d42b16e830abdb12d4a4e67729aec3b to your computer and use it in GitHub Desktop.
Why activeClassName not actived
{this.props.albums.map(album => (
<li key={`album-nav-${album.id}`}>
<Link
to={`/albums/${album.id}`}
activeClassName="active"
>
{album.name} (<TotalPhotoInAlbum albumId={album.id} loadingText="?" />)
</Link>
</li>
))}
<Route
path="albums"
getComponent={(nextState, cb) => {
require.ensure([], require => {
cb(null, require('./components/PageFrame/PageFrame').default);
});
}}
>
<IndexRoute
getComponent={(nextState, cb) => {
require.ensure([], require => {
cb(null, require('./pages/AlbumList/AlbumList').default);
});
}}
/>
<Route
path="recent-add-product"
getComponent={(nextState, cb) => {
require.ensure([], require => {
cb(null, require('./pages/RecentAddProduct/RecentAddProduct').default);
});
}}
/>
<Route
path=":albumId"
getComponent={(nextState, cb) => {
require.ensure([], require => {
cb(null, require('./pages/AlbumPhotoList/AlbumPhotoList').default);
});
}}
/>
</Route>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment