Category "reactjs"

SignalR TypeError: Failed to fetch after deploying to Azure

I am trying to create a small chat app using SignalR. In my backend I am using .net Core 5 and in Frontend, I am using React. When running in localhost every th

Refresh recoil atom with async fetch, after it has been updated locally?

I have an application where I show a set of invites, each invite has a set of answers connected, that the users can update, I have the following recoil state: e

Why babel alias did not work when set up was all correct?

1.I'm building a react project and try to use Babel to simplified the import. Here is the code for babel.config.js file. module.exports = { presets: ['modul

How to update the password of a Supabase user on a NextJs project?

I'm facing an issue updating a password for a supabase user on a BlitzJs (NextJs) project. Basically, I have a reset password method that works perfectly. First

Redux Toolkit: How can I store a serialized action creator in state?

Question I am using Redux Toolkit and I want to store an action creator in state. When I do this, I receive an error regarding non-serializable values in my act

React using state array without mutation

Can the below code be refactored so as to not mutate the state array. Basically, I want that as I navigate the app back and forth via props.history.push, it sho

Not able to display fetched data on page, React JS

I am unable to display fetched data on page. Here I am using ReactJS for frontend and NodeJS for backend. To store data I am using blockchain (hyperledger fabri

React.js: How to render new message at the bottom?

Currently working on a 1:1 live chat messenger. when i send a message its shows up at the bottom of chat where i want it to, but upon page refresh it returns to

How to modify & replace the key an object by comparing it with other objects?

I have an array of object which consists some id's as a key. const sampleObj1 = {0011:[{},{}], 0022:[{}, {}], 0033:[{},{}]} const sampleObj2 = [{id:0011, name:'

how to make an iterable type in type script that has a key value pair

I am using type script and I want to make a type that represents an object like this the keys generated are genrated dynamically how do I do that { dog:true,

createAsyncThunk redux toolkit with typescript rejecWithValue and Payload types error

I'm trynig to implement authentifiaction slice in redux toolkit with typescript, but typescript is complaining about rejectWithValue error type and the action p

Implementing React table expanded rows

It's my first time to use react-table librabry. I am struggling for the previous couple of days how to implement the expansion functionality using useExpanded h

"Expected an arrow function after this type parameter declaration" error

I got this error while running yarn start: $ yarn start yarn run v1.22.17 $ run-s build exec $ babel src/ -d lib/ SyntaxError: .../src/App.js: Expected an arrow

Apollo useQuery running twice instead of once when firing multiple queries

in my <Homepage/> component I fetch an authed user and posts using Apollo and useQuery. I can see in my network tab that each one of these queries is runn

How to call more than one function in javascript onclick event? [duplicate]

<Button onClick={(e)=>setId(_id); handleDelete()}>Delete I tried this way, but it gives error.

CKEditor getting displayed twice

I am trying to integrate CKEditor with antd in a React application. This is my code: <Form {...layout} form={form} name="control-hooks" onFinish={onFinish}&

React scroll to element (ref current is null) problem

I have a problem I'm not able to solve. The app got a component where a do looping array and making multiple elements off it. Then I want to make buttons in ano

React + vitejs + storybook setup

I am trying to setup react that is bundled with vitejs and storybook after running the setup command as per vitejs docs storybook vite builder storybook runs bu

How to make button which swaps out the title with an input field that allows the user to edit and save the title

i'm asked the following question. "Each article in the array should have an edit button which swaps out the title with an input field that allows the user to ed

React Native map with Google API, Search bar is not compactable with screen width

This is the code for React Native Map using Google Map's API. import React, { useEffect, useState } from 'react'; import { PermissionsAndroid, StyleSheet, View,