Category "reactjs"

react merging two components and sorting data by date and time (newest at top oldest and bottom)

I have codes below code removed The problem is it prints rows of expenses and then rows of incomes (i.e posts from expenses are printed first then after them i

react-hook-form's validate function always returns errors

This is the one that occurs problem. <input type="text" name="nickname" {...register('nickname', { required: true, validate: async

How to dynamically change material ui icon depending on the backend response?

I have a table and in this table, there is a column named status, and in this column, three values are returned from the backend, which are "approve", "Review"

Error when set sameSite from strict or lax to none - HTTP only cookie - ExpressJS

I am running on a MERN stack project. Back-end runs on port 5000, and front-end runs on port 3000. After I've built to production, I pushed the server file to H

How to maintain script tag position on webpage?

I am using a script tag to add a widget to my Next.js app. I have create a section component for this widget but when I run the app it renders below my footer b

Electron cache images and then read it when the image is used

When electron starts, the cache images is read, and then read it when the image is used. i can save images in main process. fetch(`${server_host_ip}${image}`)

get error Cannot find module '/app/app.js' when start NextJs on docker

I have a project on docker developing by nextjs and laravel. The project runs successfully on my laptop but when I try to run this project on another sustem wit

React prevent MUI Select from changing width in MUI Grid

I have an MUI grid setup with a variable number of columns. Currently, if the user selects a long string for the Select box, the Select grows, increasing the si

React Draft Wysiwyg dropdown options not working

I am facing issue when implementing React Draft Wysiwyg, font, size, bold and other dropdown options not working this is my code import React, { useState } from

Make cells in table editable react-virtualized

So I created a large list and I can get it to display and all that, but I need it to be editable.... so far I've tried: putting in an html input tag, which does

does the IndexedDB Wrapper Dexie.js support all kinds of Web browser?

I'm planning to use IndexedDB Wrapper Dexie.js for my react.js application. Does Dexie.js support all kinds of web browsers? If there is any limitation, kindly

What Is The Right Way to Call A Google Cloud Function via A Next.js (with Typescript) App?

The component that I have doing an API call looks like this: import React from 'react'; import { Button } from 'react-bootstrap'; class Middle extends React.Co

React-query returns Cannot read properties of undefined even though I can see id is set

I am trying to learn react-query and been following quite a few guides. However everytime I try with parameters something goes wrong. This code that I have unde

flex row exceeding page width, text-overflow: ellipsis not working

my apps flex capabilities have changed since adding some code. In my MovieContainer ideally I want the flex-direction to be row (it's currently set to column) a

Material-UI-Search Bar value not clearing

I am using the @material-ui-searchbar to filter data. I'm using the same container for multiple different pages to display the info. When ever I switch between

Error: Unable to load application: NameError: undefined local variable or method `controller_path' for Object:Class - When pushing to Heroku

beginner here learning how to push a project to production. I am pushing my ReactJS app that has a server side and client side to Heroku and have the following

Memoized functions to custom hook not picking up updated value from hook

Given a small hook defined as const useCount = ({ trigger }) => { const [count, setCount] = useState(1) const increment = () => setCount(count => c

React Router working on local but not work on real server

**When i try at local route is working but why not working on product ? i get 404 not found error. ** const App = () => { return ( <>

Fill treeview from custom array of objects. Recursion call

I'm using treeview to display my hierarchical data. I have following array of objects: const data = [ { id: 1, hierarchyid: "/", level: 0, name: "Mhz" },

Can anyone explain why my JavaScript map function displays two extra posts upon page refresh? Getting weird duplicates with and without errors

Hello friendly people of stackoverflow, I'm having a map function issue and I just can't put my finger on what the problem could be. Context is just for user da