Category "reactjs"

ReactJs and Wordpress api is there a way to upload media

I am using ReactJs for my frontend and I am trying to upload a image to my backend which is Wordpress. Currently I am able to create post, pages, and do other t

switch statement evaluating incorrectly in styled-components

I have a custom <Button /> component that properties like color, hasBorder, and outlined in its styled-component If I do the if statement like this, it is

cann't decrease a value by one in the UI with node.js mongodb, react

I am trying to update a value in the UI. When I click to update, I have a button that will decrease by one In the database and be displayed in the UI's quantity

How can I change dynamically the Width and Height to my Lottie in React?

I'm working on a web app builded in Django and React, I've a question about to change the width and height of my Lottie img when the screen change Its size. Tha

How to preview component with react portal using storybook.js

I implemented a Popper component using popper.js, and I used React's Portal to render popper element. And now I want to preview my popper component, but It fail

React app re-rendering and infinitely fetching data using axios

I'm a self-taught developer, almost entirely in native iOS apps. For a project of mine, I've hired a web developer to build a React web app (hosted by Firebase)

LocalStorage and UseEffect

I have a problem during render a screen in react. I have two modules: login and dashboard. When a user is authenticated and the api's result is 'Ok', I set a lo

Why doesn't flexing work for this spinner?

The output- [Out put of the code][1] I tried margin auto, justifying, alignment, and more but nothing worked. I am new to programming so I'm not able to underst

Why getting Cannot read properties of undefined (reading 'object') error?

I have a react application having a community chat feature. The code for the comment section is : I am a newbie to this error and have no clue about it, can som

17 renderings before showing view - React JS

I'm starting in React. I'm working on an old project that does 17 renderings before showing a view. I have no idea where the problem is. Has anyone ever experie

getting error "TypeError: Cannot read properties of null (reading 'useState')" on useState usage react

So I'm trying to use useState in my nextjs app, but as soon as I add in the line of code to initialize useState it throws a popup error with the error message:

Unable to resolve npm install pre-gyp error

I am trying to install this app locally on my m1 MacBook air > Github - Todoist Clone Running npm install in the terminal is causing the following error, ple

Use 2D Colormaps Javascript Plugin in React

I'm new to JavaScript and for an assignment I need to use 2D Colormaps Javascript Plugin (https://dominikjaeckle.com/projects/color2d/) for visualization. I kno

FluentUI TextField onchange does not fire errormessage

So I've been working with FluentUI and I've setup a TextField with a onError Property which fires but it only fires when starting the app up. When changing the

How to make React search component

I am doing my first Ecommerce MERN stack project but i donot know how to make search component that will take the search input and return array of matching prod

I want to change state of the component without reloading metro in react-native

so basically i have bunch of apps in my application as you can see in image In my app it check if application is installed or not, if its installed its shows op

Two classes on single react HTML element

I feel like there is a simple answer here, but I'm not finding it - In my react header I import my stylesheet under 'styles' and as such refers to css classes a

React get value of object from localstorge

I get data from localstorage. I used useEffect. But when I want to get a value in object, I got problem. const [carinfo, setCarInfo] = useState(); useEffect((

MediaSource never emit sourceopen event in React

I'm trying to stream a video file using Javascript's MediaSource API in a React custom hook. Here's the snippet of my code: const useMyHook = (videoRef: React.M

useQueries how to get response for a certain query

Is it possible to distinguish the response, we get from useQueries. For example const ids = ['dg1', 'pt3', 'bn5']; const data = useQueries( ids.map(id => (