Open chitresh-git opened 10 months ago
import logo from './logo.svg'; import React, { Component } from 'react' import './App.css';
import Navbar from './component/Navbar'; import NewsComp from './component/NewsComp';
import { BrowserRouter as Router, Routes, Route, } from "react-router-dom";
export class App extends Component { c = "chitresh" render() { return ( <>
</>
)
} }
export default App
check your NewsComp componentDidMount whether its properly working or not.
is it fixed? or need a hand?
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
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 (
)
} }
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