O'Reilly logo

ReactJS by Example - Building Modern Web Applications with React by Prathamesh Sonpatki, Vipul A M

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Incorporating defined Backbone models

"Next, let's define our index with how we need the routing to be and what paths should the routing respond to. From there, we will go ahead with building our components."

"Got it."

import React from 'react' import { render } from 'react-dom' import { createHistory, useBasename } from 'history' import { Router, Route, IndexRoute, Link } from 'react-router' import Backbone from 'backbone'; import Modal from './Modal' import App from './App' import { Cats, PictureModel } from './models'; import Picture from './Picture' import Sample from './Sample' import Home from './Home' const history = useBasename(createHistory)({ basename: '/pinterest' }); render(( <Router history={history}> <Route path="/" component={App}> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required