CodeWithHarry / NewsMonkey-React

News App created using React and NewsAPI
268 stars 205 forks source link

Routing is not working Due to change in react-router-dom(new update) videos no. #31 #24

Open djv03 opened 1 year ago

djv03 commented 1 year ago

this issue might face by all of the fellow developer so I have pull request to solve this problem

samaditya commented 1 year ago

import './App.css'; import React, { Component } from 'react' import Navbar from './components/Navbar'; import News from './components/News'; import ErrorBoundary from './components/ErrorBoundary' import { BrowserRouter, Route, Routes, } from "react-router-dom";

export default class App extends Component { render() { return (

}/> }/> }/> }/> }/> }/> }/>
)

} }

djv03 commented 1 year ago

hey! I know How to fix error. if want to help others by letting them know the solution then make the PR. if any query reply to this message

Rahulsukare commented 1 year ago

Downgrade your react-router-dom to v5.2.0 as follows, npm uninstall react-router-dom npm install react-router-dom@5.2.0

djv03 commented 1 year ago

I knew it. But I have made PR based on latest routing docs