Category "reactjs"

ElectronJS - sharing redux store between windows?

I have an electron app based on electron-react-boilerplate. Now, that I have one window running as I wanted it to run, I started to create a new window. I cur

How to implement pagination in React

I am new to ReactJS and am creating a simple TODO application in it. Actually, it is a very basic app with no DB connection, tasks are stored in an array. I add

@apollo/client TypeError: link.request is not a function

I've got this react component throwing at me this error: Uncaught TypeError: link.request is not a function at ApolloLink.execute (ApolloLink.js:65) at

Unable to resolve path to module '@aws-amplify/ui-react/styles.css'

I am getting the error: Unable to resolve path to module '@aws-amplify/ui-react/styles.css' I am using the amplify authenticator component shown in the follow

How to use MUI in Redwood JS?

I want to install MUI in the Redwood JS. But when i ran the command in the project directory yarn add @mui/material An error popped up in the console saying er

React DatePicker how to open datepicker on click of icon

Trying to open datepicker on click of icon of react-datepicker component, I have gone through their docs and issues links but found that its not much useful. &

Type text into a React input using javascript (Tampermonkey script)?

I'm trying to make a Tampermonkey script that'll automatically enter text into some form input fields. Normally, you can do this with just: myElement.value =

NextJS: Main and Nextscript

Exploring NextJS a bit for its server side rendering features. It looks really nice and easy to use. I already explored the _document.js file which we can inclu

Add space in self closing tags before in self closing tags

How do you include a space before the closing tags in self closing tags with WebStorm/IntelliJ-based products? Default settings turns <ReactComp /> to &l

firebase signOut() method doesn't sign out

I use firebase v9 and created a react hook for convenient verification of user authorization. After authorization, I can't log out on the page as if the signOut

Why componentDidMount gets called multiple times in react.js & redux?

I read componentDidMount gets called only once for initial rendering but I'm seeing it's getting rendered multiple times. It seems I created a recursive loop.

React function based component wont return component inside nested map function

I am trying to output different components based on the inputType, however the component or anything that goes into the DOM does not render (aka console.logs fi

How to solve async-await function problem while using Axios?

I want to use axios using async await function. But when I use async await function then I get an error. useEffect(async() => { await axios .get("

React-Idle-Timer: Show countdown of remaining time

Is it possible to show a second-by-second countdown of remaining time in React-Idle-Timer? This example they have on the site only shows it in certain scenarios

Reactjs : Failed to load module script: WIth MIME type "application/octet-stream" for sharepoint webpart

I'm using reactjs project for use as a webpart for the sharepoint project. But when i deploy the build project. It give me below error. Failed to load module s

How to render live session of website and also interact with it

So there are a few tools to record and view live sessions of users on your website using js sdks's like: logrocket, hotjar, https://github.com/rrweb-io/rrweb ht

Yup returns always an error even if all fields are valid

Yup is returning always one error in the array even though all fields are valid. The validation is working fine, is checking each field and showing the errors c

Amplify UI is not working proper in React js

I am using AWS amplify for user authentication. UI is not what expected but no problem with functionality. Amplify dependencies "dependencies": { "@aws-amp

Error: useLocation() may be used only in the context of a <Router> component

I have installed react-router-domV6-beta. By following the example from a website I am able to use the new option useRoutes I have setup page routes and returni

How to tell if a user is logged in with http only cookies and JWT in react (client-side)

So I'm trying to follow the security best practices and I'm sending my JWT token over my React app in a only-secure http-only cookie. This works fine for requ