Category "reactjs"

webpack dev server only reloads once

Ok so now i have read a lot of different issues on stackoverflow without any luck, they seem all to go to an older version of webpack-dev-server. I have tried a

Using the Context API as a way of mimicking useSelector and useDispatch with redux v5

I'm working on a React project where I'm constrained to using React Redux v5, which doesn't include useDispatch and useSelector. Nonetheless I really would like

Fill parent container and reduce image resolution with next/image

I'm trying to fill a fixed-size container with an image. layout="fill" works like a charm, but even though container is only 125x125, the original image gets do

Firestore to query by an array's field value

I'm trying to run a simple query, where I search for a document that contains a value inside an object array. For instance, look at my database structure: I wa

Using Remark and Rehype plugins with MDX in Next.js (with @next/mdx)

I was trying to use Github Flavored Markdown using @next/mdx but I can't seem to figure out how to use plugins with the code. Here is what I did: (I am followi

NextJS scroll into view of specific component upon button OnClick that exists on a different js file

I'm using NextJS and I have my components on different js files that come together under one js file on my "pages" folder (index.js). What I want to be able to

React MUI: theme color custom prop not applied

I have 2 themes, dark mode and light mode: import { styled, alpha, ThemeProvider, createTheme } from '@mui/material/styles'; //I use the dark theme only const

Tree shaking of shared dependencies in webpack 5 module federation

I am working on an architecture for a dynamic dashboard with components fetched from different remote react bundles using webpack 5 module federation. I do have

Vite support for decorators

My code has some .js and .jsx files that use Mobx decorators. I tried adding the babel plugin, but it seems that it's being ignored. My vite config is import {

Adding inline stylesheets in HEAD on Next.js blog

I have a blog (http://minid.net) in Jekyll that I want to migrate to Next.js. My blog doesn't use an external file for styles. I embedded all the styles in the

OpenID Connect + Django DRF + React: How to use?

I have a web application made up of two parts: back-end which is implemented using Django + Django Rest Framework (DRF), and front-end which is a React App proj

Why component doesn't rerender?

const [dammy, setDammy] = useState({ name: "any", status: { "1.0.1": "Successfylly installed", "1.0.2": "Successfylly installed", "1.0.3": "Succ

How to pass a File JS object to Rails controller

I have a JS file object (like the one below) that I'd like to pass to my rails controller. File {name: 'undefined', lastModified: 1652457009460, lastModifi

React useTable hook with typescript

So I have a JavaScript class with useTable. In Java script its been used like below import {useTable, useFilters,useAsyncDebounce,useSortBy,usePagination,} from

"Uncaught SyntaxError: Cannot use import statement outside a module" When Importing ReactJS

Today I decided to try to learn React, but whenever I try to import the two modules below: import React from "react" import ReactDOM from "react-dom" I get the

MUI v5 : How to pass css classes to components using className prop? Also I want to use theme in those classes?

MUI v5 : How to pass css classes to components using className prop? Also I want to use theme in those classes? I was trying to do it using styled in MUIv5, bu

New React app failed to compile immediatly following install

I have been using React Native for a while but figured I would try out React on the web. So I followed this guide: https://reactjs.org/docs/create-a-new-react-a

Error: Prevent writing to file that only differs in casing or query string from already written file. reactjs laravel

I am working on a laravel reactjs project and when I run the command npm run dev the compilation stuck at 95% and give the following error. I checked in the wh

How to have a loading screen until all my components are mounted in React

I do not have any API calls for my react app, I want to have a loading page while all my components are being mounted (including all children). My page does tak

How to delete an item from a list using input in form (React using states)?

I want to delete an object from an array using its name. const [formDataRemoval, setFormDataRemoval] = React.useState({ name: "", }); When input change