skip to Main Content

How to use a button in a link in react? – Reactjs

I'm a beginner with react and I have this code: import {NavLink as Link} from 'react-router-dom' return ( <div> {posts.map((actualData, index) => ( <Link to={'/' + actualData.id}> <div className='format_link'> <div className='image_link'> <div className='image'> <img className='images' id={actualData.id} src={getImage(actualData.path, 0)} alt='Italian Trulli'…

VIEW QUESTION

Link to another page from App page not working – Reactjs

Index.js import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; import App from './App'; const root = ReactDOM.createRoot(document.getElementById('App')); root.render( <React.StrictMode> <App /> </React.StrictMode> ); App.js import './App.css' import Release from './components/Release' import { BrowserRouter as Router, Routes, Route, NavLink,…

VIEW QUESTION
Back To Top
Search