Category "reactjs"

When i fetch Heroku deployed a link, there is an error 500 (Internal Server Error)

If i used http://localhost:5000/login everything is working. When i used live link https://auto-shoroom.herokuapp.com/login there's the error POST https://auto-

Uncaught (in promise) Error: Invalid hook call. - SPECIAL CASE

I know that hooks cannot be called from functions other than React Functional Components, this is a bit different. I have created some utility/service type func

Tailwind CSS classes not updating after initial build of react app

I decided to bite the bullet today and upgrade from tailwind v2 to v3 for my react app. The upgrade went well, but I now have a problem where after I run "npm s

Unexpected token in JSON at position 0 when running npm start in React Typescript project

Whenever I try to run the 'npm start' command, I get this weird error. It was working fine a few hours ago and now it simply won't start. I've tried reinstallin

Cannot properly concat to an array in ReactJS when using useState hook

I have a button that increments a vote counter whenever it is clicked, however I am having trouble implementing it. When I first click the Vote button, the func

Error: Unexpected "<" in vite react in JS files

I am making a react app with vite instead of creat react app. When I use .jsx as suffix, it works fine. But when I use .js, throws hundreds of errors in my file

"react" was conflicted between "package.json » eslint-config-react-app

I want to know, why this problem happens sometime. I overcome it by opening the desired folder with code directly. But can't use git bash. And saving package.js

How can I use reactjs useState hook without broke my react app?

When I try to add my Home-index.js useEffect hook my web page completely gone. Here is my codes. index.js useEffect(() => { return setTimeout (() => {

How to call a function immediately

I write my request in my parent Component with code below: useEffect(() => { // my request }, []) As we all know, useEffect of parent component will imple

Axios POST with the server responded with a status of 500 (Internal Server Error)

I'm using ReactJS to build a blog app. I can use axios get, put, delete but NOT POST. Every time I post a new blog, it gives me server responded with a status

Css and Js not working after deploying the next+react project to server side

I have React+next and node js projects I want to deploy that project in one port. For that, I created ts file to js and ran the. next folder to the backend side

How to make SWR only fetch data when user changes date values?

I'm trying to use SWR, and while it's awesome, it keeps fetching data over and over. I want it to only fetch data again when there has been change to the time i

Need to do Radio button in antd default checked

I have a Radio Button Group with dynamically data coming from an array. Here's the code : <Radio.Group options={uniqueRadioElements} onChange={onCate

How to render different style css on same component?

I have react component which is a button and I render this component three times. I want to add some CSS on the second component but I don't know how. I tried t

Updating create-react-app to latest version breaks async tests

I have an issue, I have recently upgraded my version of react to use react-script version 5.0.1 from version 4.0.3. Doing the instructions as per https://github

Module not found: Can't resolve 'regenerator-runtime' in next js 12.1.5 with react 18 with node 16

My package.json is like "scripts": { "dev": "next dev" }, "dependencies": { "next": "^12.1.5", "react": "^18.0.0", "react-dom": "^18.0.0"

Integrate Django and ReactJS with Kafka to generate some analytical data for users?

I'm implementing a Django web service, which is about to have different platform apps, Reactjs for computers, a swift app for ios, and Kotlin for android device

React Hooks - Using useRef without direct access to HTML Element Code?

With React I'm inside of one repository, and the HTML elements are loading from another repo, which I watch for using pageLoaded. Inside updateHeader there is j

How to get a Fieldvalue only if other fieldvalues in the same document are true

How to: If I want to retrieve a FieldValue (String) only if in the same document there is another field (boolean) which is true. For Example: If I have a Docume

Should I use React Router redirect OR package.json "homepage" property for setting a relative path as homepage in my React app

TL;DR - I want my React app to start with a relative path domain.com/tweets Hello everyone, I'm creating a React app that fetches tweets from Twitter API. Becau