Category "reactjs"

Formik Initial Values out of Sync with Redux

This form is used to edit a user profile. It should load with up to date user data for the initial values. To handle this, I've added a redux fetchUser action i

webpack-dev-server Cannot find module 'webpack'

I'm trying to use webpack-dev-server to run a simple program but I'm getting this error: module.js:471 throw err; ^ Error: Cannot find module 'webpack

How to reduce bundle size of first load page in Next.js? [duplicate]

I have a very big bundle size of one of my pages. How can I improve the first loading of the page in Next.js? Pls take a look on screenshot

Getting ReactJS/TypeScript to work with new clean MVC5 project

I've already tried nearly all available tutorials to get a simple MVC5 project to run using TypeScript and ReactJS. Note: I've created the projects from scratch

React Navigation: Is there a way to add another instance of a screen on top of an existing instance of that screen in StackNavigator?

In my React Native app, I have a stack navigator with screens A, B, and C. Screen A displays info on a given user. I want to create a switch user button on scre

rtl in material UI cause ruined my app appearance

I setup my rtl configuration step by step in v5mui. Using: emotion as styled-engine stylis v4 stylis-plugin-rtl v2 Every thing is OK but when using some complic

Module Not Found: Can't resolve 'http2' when importing firebase-admin

Failed to compile ./node_modules/@grpc/grpc-js/build/src/channel.js Module not found: Can't resolve 'http2' in '/Users/Michael/Development/Proje

ReactJS reduce image file size without losing aspect ratio after user selects it in an input

I've been searching everywhere without luck. A simple way to reduce the width of an image picked with a simple <input type="file" /> without it losing it

Compare value inside of use-deep-compare-effect

This is a part of use-deep-compare-effect source code export function useDeepCompareMemoize<T>(value: T) { const ref = React.useRef<T>(value) co

Black Line appears in Safari not Chrome using Ant Design Table

I'm using Ant Design UI Library in React. Using Table Component and using fixed columns features like this, The black line appears in Safari not Chrome. I th

How to use componentWillMount() in React Hooks?

In the official docs of React it mentions - If you’re familiar with React class lifecycle methods, you can think of useEffect Hook as componentDid

How do i configure makeStyles hook in material-ui with a custom jss insertion point?

I have a react component which i have wrapped & released as a web component. However all style-sheets created using makeStyles hook are not getting applied

Downloading a docx file via react.js

Hi i have been trying to download a word file via react.js but when i press submit and it downloades it cant open the word file. The console.logs looks complete

React Google Identity services

I have been trying to implement Google's identity services API in my React app, but couldn't get it to work. I'm trying to implement the following really simple

react-pdf failing to render base64 PDF data, interpreting as hex string

I'm trying to use the react-pdf library to display a base64 encoded PDF file. The B64 data is accurate, as it loads in an iframe as such: <iframe classN

How to compare oldValues and newValues on React Hooks useEffect?

Let's say I have 3 inputs: rate, sendAmount, and receiveAmount. I put that 3 inputs on useEffect diffing params. The rules are: If sendAmount changed, I calcul

simple react snippet is not generating functional component with const

I am using this extension to generate code snippets when working with react. In documentation it says when used fc abbreviation it should work as below. fc - Fu

How to protect reactjs resources with spring boot based authentiation?

My current project state: I am working on a Web Application with ReactJs (frontend) and spring boot (backend). When I deploy this application, I package react

How to protect reactjs resources with spring boot based authentiation?

My current project state: I am working on a Web Application with ReactJs (frontend) and spring boot (backend). When I deploy this application, I package react

Show/Hide menus based on User /* Flexible menu by menu */

I have React App with sidebar menus, but I want to hide few of them based on User Role, but don't want common roles like 'ADMIN' , 'MODERATOR', etc. I want to m