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
83
questions
0
votes
1
answer
17
views
Uneven spacing between flex items when using flexbox [duplicate]
NavBar.js
import React from "react";
import ReactDOM from 'react-dom';
import ReactDOMServer from 'react-dom/server';
import './NavBar.css';
function NavBar() {
const heading = 'first ...
-1
votes
1
answer
27
views
Generate object access keys from props
I have problems with dynamisation in Typescript. I know that TS works statically. However, there are sometimes situations where I want to access an object dynamically and cannot do this directly via ...
0
votes
1
answer
32
views
tsParticles particles not showing
I'm trying to do a polygon mask on an svg with tsParticles.
However neither the particles or the svg show up, only the background color I define in my CSS.
Here is my particles component:
import { ...
0
votes
0
answers
11
views
sticky worked fine but after adding menu navbar it broke right now not working
I was using the CSS position: sticky on my sidebar so it moved down as the user scrolled. However when I added the mobile menu which transitioned in from the right, the sticky sidebar broke. Could not ...
0
votes
0
answers
12
views
Mock static method of object in react jest
I want to mock a static method defined outside a component.
Here is my component:
import Authenticate from '/api/Authenticate';
export default class MyComponent extends React.Component {
render() {
...
0
votes
1
answer
13
views
babel-plugin-styled-components works well with NODE_ENV=development but not with NODE_ENV=production in React app
I am facing the following situation in my React App. I use babel-plugin-styled-components. When NODE_ENV!==production classes are generated and injected in the head tag and used by the React ...
0
votes
0
answers
5
views
Mapbox: Text of the point/circle behind is visible over the point in front
I want to show the points and to write data inside. Problem is that the data (numbers) are shown for the points behind instead of the ones in front.
I would also like for smaller number circles to ...
-1
votes
0
answers
14
views
Having issues with a messenger clone
So everything was working fine until I decided to add a header component to my messenger clone.This specific problem has returned null and crashed my application like 5-6 times. Can anyone help why ...
-1
votes
0
answers
32
views
How to add a horizontal scroll onclick with a button or arrow?
I am trying to add a simple button to scroll horizontally, not using any libraries or anything just want to keep it simple. As of now I have the cards flowing horizontally in one row and there is the ...
-2
votes
0
answers
12
views
Hello everyone, I want to create and publish my own React packages. needed your guidance.thanks
I am interested in creating and publishing my own React packages and would greatly appreciate any guidance or information you can provide. Here are some specific aspects where I need help:
...
0
votes
1
answer
37
views
How can the input value be enclosed in a variable?
I'm trying to create a component that will have an input and a button. In input, the user enters his nickname. This nickname, that is, the input value, must be stored in a variable. This variable is ...
0
votes
1
answer
30
views
How to fetch data for Client Components on server-side
When I say Client Components -> I mean files that uses use client at the top of it, and Server Components — files that are using use server accordingly
Nobody says, how to fetch data on the server ...
0
votes
0
answers
11
views
react ts inversify doesn't work with class component
https://github.com/Lavshyak/react-ts-component-class-inversify-problem
Check render() code:
import {useInjection} from "inversify-react";
import {Bar} from "./Bar";
import {...
0
votes
1
answer
21
views
require not defined error while deploy vite-react app
While deploying a vite-react app in Netlify I am getting white screen and require not defined error.
I tried removing "type":"module" from packag.json file.enter image description ...
0
votes
1
answer
18
views
Infinite Loop in React errorElement
I have a problem with an infinite loop/memory leak in react. The global error handler is initiated like this:
export const routesConfig: RouteObject[] = [
{
path: '/',
element: <App />,
...