Category "reactjs"

useEffect triggering before useState [duplicate]

I have a form that is supposed to register every input (through useState) and constantly check if that is valid (through useEffect), but that

Is there any library which can tell current version of the application is installed in users system in RN

So i want to find current version of applications in React-native so, that i can compare with latest version and send update alert to users.

How can I separate the JSX mapping logic from the mapped array containing components with props?

I have a component that maps over an array of components that have props passed into them, something along these lines: const Component = (prop0, prop1, prop2)

React (Next.js) hook useOutsideClick cancels my links

i'm using the following hook to handle "click away" feature to show/hide a dropdown: const useOutsideClick = (ref: NonNullable<RefObject<HTMLButtonElement

How to display image name in Ant design <Image.PreviewGroup> component?

<Image.PreviewGroup> <Image width={200} src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg" /> <Ima

How to add linking images to ckeditor in React?

I want to add Linking images feature to my React app that uses ' @ckeditor/ckeditor5-build-decoupled-document code: import React from 'react' import { CKEditor

How to create dynamic Header from API React table

How can I create a header for my react table based on the API response? for example the data I don't want to define columns manually for the table, so how can I

How do you access query arguments in getSelectors() when using createEntityAdapter with RTK Query

I've been following along the REDUX essentials guide and I'm at part 8, combining RTK Query with the createEntityAdapter. I'm using the guide to implement it in

I want to open a new Tab in React application on button click?

I want to open a table tab in a new window to interact with the component separately. What's the best recommended method to do this functionality in React.js?

ReactJS content does not load with cookie bot

We have a reactjs application with google sso login and we introduced cookie bot into it. We added both scripts to index.html file as it was described in the gu

First response after refresh page from axios is empty

This function is called up after pressing the button. Whenever the page is refreshed and the button is pressed, it is empty, the second click returns an array w

Why my navbar is not working for small devices?

I'm doing a small project using react, where I needed navbar, so I copied the navbar code from flowbite(that uses Tailwind CSS), I've changed all necessary thin

Export TailwindCSS CSS rules to file instead of rendering CSS rules on DOM

On my project I use: TailwindCSS + Emotion + Tailwind Macro. I just want to export TailwindCSS CSS rules to the currently generated styles.css file instead of

how to use form data with custom hook in react js?

I have my custom axios hook, to send data without files it works perfectly, but when I send files it does not recognize any data. ...... const axiosFetch = asyn

How to check whether a component renders a deeply nested child of a certain type?

A Modal component must render a Modal.Content, but not necessarily as its immediate child. For example: Allowed <Modal> <Modal.Content>...</Mod

Avoid URL parameter Manipulation

So in my case, after a user chooses a certain room, the number of nights he will stay and the number of guests, the price gets calculated (depending on certain

Retrieving images from json server and display with relevant question

I am building a trivia app. initially I just implemented plain text Q&A trivia but now I also want to add images with questions. I am getting data from my l

Code with event handler using "functional state update" working perfectly in React 17 does not work properly in React 18

I have observed a very strange behavior of React 18 compared to React 17 and I am wondering what I am doing wrong (since React 18 was not supposed to "break" ex

How do I store an array of objects that have arrays as value in Redux?

How do I store an array of objects that have arrays as value in Redux where the value is an array of items and key is a string like the name. I have to store so

Color picking by coordinates

When using a colorpicker like from google, the luminosity at the top left is 100%, on the top right it is 50%. However on both corners on the bottom the luminos