Questions tagged [reactjs]

React is a JavaScript library for building user interfaces. It uses a declarative, component-based paradigm and aims to be both efficient and flexible.

Filter by
Sorted by
Tagged with
0
votes
0answers
5 views

MUI theme with different palette mode for nested components

I have: A main theme with DARK mode. -> A card-like component with LIGHT mode (because it has light background). ->-> Some Selects in the card-like component, and I want the MENU to be DARK ...
0
votes
0answers
4 views

Display an error message when API is not working

I have a table data where I'm fetching that data through API. I need to display an error message on the user screen like something went wrong message I tried the below code const ...
0
votes
0answers
6 views

TS2322 Error Type {} is not assignable to type 'undefined'. when using SX Prop Nested Component. MUI Drawer example not compiling

I am trying to compile and run the MUI Drawer component (permanent fixed) version and typescript is not compiling. It is throwing a TS2322 error. $ npm run build > [email protected] build > ...
0
votes
0answers
4 views

Firebase snapshot stored in React Context

I'm starting to work on a brand new app and I have certain amount of data coming from Firestore that's always being used so I figured I'd just add it to React Context and make it available all the ...
0
votes
0answers
4 views

ReferenceError: _webpack_require_ is not defined

I am trying to do this guide Here React JS API, but I always just get a white screen with the here watermark and without a map and this error to. ReferenceError: _webpack_require_ is not defined 2 ...
0
votes
0answers
4 views

Using NetGear in Javascript

I'm trying to stream a video from a REST API python server to a JS client. I can use VidGear for that. Is there a way to get a ReactJS client to work with this implementation? Server: video_stream = ...
0
votes
0answers
7 views

Easiest way to translate a div of text in (React) Javascript?

A lot of the translate things I am seeing are overly complicated or translate all the text on the page. I am looking for the simplest plugin or library or something to simply translate a chunk of text....
0
votes
0answers
14 views

How to mock boolean function in jest?

I have a react functional component in which I am calling functions based on the if condition. Example const Root: React.FC = () => { useEffect(() => { if (!isScript()) { addScript(); }}, []); ...
0
votes
1answer
11 views

ESLINT Unexpected top-level property "import/order" error

I'm trying to create a rule to have a one empty line between internal and external imports. .eslintrc.json: { "parser": "@typescript-eslint/parser", "env": { &...
0
votes
1answer
9 views

skipping documents in mongodb for pagination

I want to skip some documents according to the page count. For example when I make a GET request to http://localhost:3001/posts?page=2 I want to get 10 documents per page from 10-20. router/posts.js ...
0
votes
0answers
9 views

How to remove old generated pages (Next js)

I would like to know if there is any way to delete old generated pages after revalidation(ISR) in Next js. Suppose I am fetching data from a news api and generating static pages with latest data. But ...
0
votes
1answer
16 views

Change stroke and fill color of SVG on hover

I have an SVG that looks like this : Which on hover /active must turn into Normal Icon <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <...
0
votes
0answers
7 views

Chart value is not updating automatically. How can I update my chart according to my selected date?

I am using react chart js 2. When I update my date field the graph chart is not updating automatically. The default date is 05/18/2021. After clicking on the filter button both charts should be ...
0
votes
0answers
14 views

Instagram icon with hover effect

I have the following instagram icon and when I hover the mouse I would like the background to become white and the icon to become colored In Footer.js : <a href="https:...
0
votes
0answers
20 views

How to prevent empty messages from being sent

I'm making a simple React chat with Fairbase. I am not strong in this and therefore I have such a situation that if I do not display anything in niput and press enter, then I will send an empty ...

15 30 50 per page
1
2 3 4 5
24081