Answer the question
In order to leave comments, you need to log in
Why do styles from one component pass into others?
I'm making a simple React app using create-react-app
I'm currently working with routing
I wrote the following in index.js:
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import { HashRouter, Route, } from 'react-router-dom';
import About from './components/about/about';
const mainStore = createStore(reducer, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__());
ReactDOM.render(
<Provider store={mainStore}>
<HashRouter>
<div>
<Route exact path="/" component={App} />
<Route path="/about/" component={About} />
</div>
</HashRouter>
</Provider>,
document.getElementById('root'));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question