EN VI

What is Reactjs?

React (also known as React.js or ReactJS) is a free and open-source front-end JavaScript library for building user interfaces based on UI components. It is maintained by Meta (formerly Facebook) and a community of individual developers and companies. React can be used as a base in the development of single-page, mobile, or server-rendered applications with frameworks like Next.js. However, React is only concerned with state management and rendering that state to the DOM, so creating React applications usually requires the use of additional libraries for routing, as well as certain client-side functionality.
Posts (9)
Questions (44)
2024-03-13 15:30:06
You are "redirecting" to "shipping" which is a relative path since it doesn't start with a leading "/" character. Relative paths will get appended to the current path, e.g. if the current path is "/lo...
2024-03-13 19:30:04
Seems like you want't to keep the renderOption, or assign a new (arrow) function, you can use the Nullish coalescing operator (??) to fallback to the arrow function if renderOption is null or undefin...
Tags: Javascript Reactjs
2024-03-13 21:00:08
Looks like you might not be passing the form data to your api, Should update your request to this: export const uploadFile = async (formData: formData) => { const fd = new FormData(); fd.append("c...
2024-03-13 22:00:07
Looks like you might not be passing the form data to your api, Should update your request to this: export const uploadFile = async (formData: formData) => { const fd = new FormData(); fd.append("c...
2024-03-14 00:30:04
It's because your fetcher caught and "handled" the error, and then is simply returning it. The loader sees this as just a normal return value. Re-throw the error so the loader can "catch and handle" i...
2024-03-14 00:30:06
At the start of the component: const timeoutsRef = useRef([]) Then: const id = setTimeout(() => { clearAlert(alert.id); delete timeoutsRef.current[alert.id] }, options.autoDismissTime) timeoutsRe...
Tags: Reactjs timeout state
2024-03-14 02:00:07
check this playground. i recreated your example and it works fine, but you need to use discriminated union types in your hook implementation. maybe you are not running the latest typescript version? t...
2024-03-14 02:30:06
It doesn't need to be declared in your index file, but it just needs to be declared/rendered higher in the ReactTree than any of the components that need to access the routing context it provides. You...
2024-03-14 03:30:04
import React from 'react'; import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'; import Home from './components/Home'; import About from './components/About'; import Contact from...
Tags: Reactjs
2024-03-14 04:30:06
You can not access session variables, or at least not directly, you will need an API to retrieve these. session variables are stored at the server-side, and normally used for sensitive data you don't...

Login


Forgot Your Password?

Create Account


Lost your password? Please enter your email address. You will receive a link to create a new password.

Reset Password

Back to login