Questions tagged [reactjs]
React is a JavaScript library for building user interfaces. It uses a declarative, component-based paradigm and aims to be efficient and flexible.
reactjs
479,581
questions
0
votes
0
answers
4
views
How can I layer two backgrounds over each other in a way that they do not clash in Tailwind?
I'm trying to have a container act as an accent of sorts for another container. As in I have a text box that is styled and underneath it I'm trying to have a similarly sized container of a different ...
0
votes
0
answers
6
views
How to properly type a getter when assigning value using a tuple
In my TS React App, I am using Zustand to manage the states of all dialogs/modals.
Here is how I typed the ModalStoreState:
type ModalStoreState = {
/**
* 1st arg is "name" of the ...
0
votes
0
answers
4
views
router.refresh() from next/navigation doesnt working
Here in my component I have onSubmit which every time a task is added, it must reload the page, but it is not reloading after the onSubmit function is called, I have already checked and I do not ...
-1
votes
0
answers
15
views
How can we avoid player position allocated in same team during random team generation
Would like to generate two or three teams based on selection ie ( 7-aside or 8- aside) . While doing the generation for 3 teams, for a 7 side game with 20 players, D-level players or F level player ...
0
votes
0
answers
6
views
Why am i getting empty form data from my form?
It was working a while ago, i cannot exactly remember whati have touched but now i do not get any values anymore, for some reason it only prints out my userId, referral, referralSource and ...
0
votes
0
answers
13
views
Managing React child state on parent and on child
This react component renders a file structure and toggles its children between expanded and collapsed state when it is clicked on.
There is also a button to collapse all and expand all items.
Explorer....
2
votes
0
answers
29
views
I'm getting the error 'ReferenceError: useState is not defined'
The developer tools compiler is currently giving me this error:
ReferenceError: useState is not defined
With this block of code, I'm trying to retrieve multiple players name and picture from an NFL ...
0
votes
0
answers
13
views
Can I display texted formeted as html in CSV Dowoloader
I have reports that users can download into a .csv file but a few of the fields have html formatting from a WYSIWYG editor. Is there a way to display the html in the field in the .csv field?
Here is ...
1
vote
1
answer
43
views
React Context with hooks not populating state in context
I have the following React 18 code:
import { Dispatch, ReactNode, SetStateAction, Suspense, createContext, useEffect, useState } from "react";
import { InternalConfig } from "../types/...
0
votes
0
answers
6
views
react-beautiful-dnd: How can I prevent elements from shifting around when `isCombineEnabled=true`?
There's an example here, showing exactly what I want but they don't share the full code: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/combining.md
Here's what I've got:
...
0
votes
1
answer
23
views
In React, I'm getting the ".map is not a function" error when I attempt to map a list of objects
I'm brand new to React, and still pretty shaky on Typescript and Javascript and I'm attempting to make a React component that will iterate through an array of Account objects that would be passed into ...
0
votes
1
answer
19
views
Cann't Use SVG in next.js
I have an svg file in my project which I want to import
import Logo from "@/assets/logo.svg";
import Image from "next/image";
import MenuIcon from "@/assets/menu.svg";
...
0
votes
0
answers
7
views
Use React-Joyride with Shadcn modal or sheet
I am not able to use react-joyride with the shadcn sheet component.
As soon as the sheet is opened the tutorial automatically skips to the next step, as intended. The issue is, that I cannot click ...
0
votes
1
answer
24
views
Render Items in Component Not the whole component
am getting data from websocket for real live update am updating Inside Popup of leaflet map, useEffect start re-render to get new data so the Popup disappears and I need to click again on the mark on ...
0
votes
0
answers
14
views
Multiple re-renders issue when updating loading state on parent component in React
I have a parent component which has a isLoading useState and read params from the URL and pass them to child component:
export function MainUserDetails() {
const [isLoading, setIsLoading] = React....