reactjs – How to set react routing?

App.js import ‘bootstrap/dist/css/bootstrap.min.css’; import React from ‘react’; import { BrowserRouter, Routes, Route } from ‘react-router-dom’; function App() { return ( <> <BrowserRouter> <Routes> <Route path=”” element={<Home />} /> <Route path=”/student-register” element={<StudentSignup />} /> <Route path=”/staff-register” element={<StaffSignup />} /> <Route path=”/login” element={<Login />} /> <Route path=”/create-group” element={<ProtectedRoute><CreateGroup/></ProtectedRoute>} /> <Route path=”/request-supervisor” element={<ProtectedRoute><RequestSuperVisor/></ProtectedRoute>} /> <Route path=”/request-cosupervisor” element={<ProtectedRoute><RequestCoSuperVisor/></ProtectedRoute>} /> … Read more

reactjs – I’m having errors in both backend and frontend. Koa & React

When I’m going to run the code it gives the following error. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! react-app@1.0.0 start: webpack-dev-server –mode development –open –hot –port 3000 npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the react-app@1.0.0 start script. npm ERR! This is probably not a problem with … Read more

reactjs – Getting Axios from React to Work with Spring Boot + Spring Boot Security

I have created a react app with a spring boot backend but I’m having trouble pulling the data through with axios. I have checked numerous SO posts as well as documentation with spring to no avail. I was initially blocked by CORS but I was able to resolve that with Spring Security. However, spring security … Read more

reactjs – Why I got 422 unprocessable content when I try to reset password?

Hello everyone I’m on resetting password with laravel and reactJs actually when I try to reset password I always get error 422: {password: [“The password confirmation does not match.”]}. But I’m sure the two passwords are the same this is the function in backend: public function reset(Request $request) { $request->validate([ ‘token’ => ‘required’, ’email’ => … Read more

reactjs – How to deploy react application on heroku using .gitlab-ci.yml

I have created a React app and used webpack to bundle it. Now I am trying to deploy the app on Heroku. The build is successful but when I try to open the link I get “Application Error”. This is my webpack file import * as webpack from ‘webpack’; import * as webpackDevServer from ‘webpack-dev-server’; … Read more

Material UI V5, inalid hook and ForwardRef(Button) Problem in ReactJS

I am trying to use Material UI in my project and getting an invalid hook, The above error occurred in the <ForwardRef(Button)> component, and some other problems. I created a simple test file to isolate and make sure that material UI is the issue. Any idea on how I can fix this issue, thank you. … Read more

reactjs – Cross Origin 403 – No Acces-Controll-Allow-Origin – Failed to fetch

I can’t get any further. As soon as I try to fill out the form in the React frontend via the “FireFox” browser, the Origin cannot take “localhost:3000” to localhost:8080. I get error 403. Cross origin request is blocked. Despite “Access-Controll-Allow-Origin on *this message comes up. In Postman Software I can get 200 OK on … Read more