CodeWithHarry / NewsMonkey-React

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

routing is not working properly..... even after i have used the unique key in the router part , the page is not loaded by itself for example if click on sports tag the page remains unchanged but as soon as i refreshed the whole page , sports news is visible so how can i show sports news without refreshing the site just by clicking on the tag #35

Open Rknilkant opened 8 months ago

Rknilkant commented 8 months ago

app.js

import './App.css'; import React, { Component } from 'react' import NavBar from './components/NavBar'; import News from './components/News'; import { BrowserRouter as Router, Switch, Route, } from "react-router-dom";

export default class App extends Component {

render() { return (

)

} }

prakashreddy5155 commented 3 months ago

bro use Routes instead of switch