What tags should be used in JSDoc3 for void methods that “return” by setting values?

I am documenting methods within a React Component using JSDoc3. Because I am using React Components all values "passed into" the method are through the props and the value "returned" is really an at

View details »

How to prevent the rerenders and improve performance (Todo example with hooks)

I want to dig into React hooks a little bit and have been trying to figure out how to make my components more performant. Even though I think I'm using useCallback at the right place, my application

View details »

Change style of an element at DragEnd in React beautiful dnd

Hello to all i'm tryin to learn react-beautiful-dnd, I follow all the official tutorial and tried to read the documentation but it's not so clear at all. But what if i want to render a complex

View details »

rendering Html forms as pdf

I have two html forms(containing dynamic content stored in variables). When the user clicks the download PDF button, he/she should be able to download one PDF of two pages containing the two forms.

View details »

Surrounding try catch block around require keyword

I have a function in one of my files that the user can call with 2 parameters. These parameters are then used to construct a file path and if a file exists in that path then it should get that, else

View details »

preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin when using passport-google-oauth-2

I'm getting this error when trying to log users in with google using passport-google-oauth-2. I have a local strategy that works fine logging in and registering, but when it comes to 3rd party oauth

View details »

React-native using same component with it's state on multiple screens

I am having a video player component created using react-native-video. As of now I am diaplaying the video player with same source and current played time on 3 different screens using parent state a

View details »

How to generate list when word is selected?

How can I generate list with words that is attached to the selected word? I have a table like this: Column1 I eat banana I have beautiful car Lets say person double click on

View details »

Material-UI How to change TransitionComponent of Customized Snackbar to Slide

I want to change the transition of snackbar to Slide up instead the default Grow, but I found it difficult to do so on Customized snackbar: import React from 'react'; import PropTypes from 'prop-ty

View details »

Position “sticky” not working in ReactJS app, and no “overflow” attribute specified in parent

I'm building a React app, and I'm having a problem with position: sticky in my story-header element. I already checked the parent styles and there's no overflow: hidden attribute-value. HTML <div

View details »

How to use react-bootsrap carousel with gatsby-image?

I'm trying to build a react-bootstrap carousel using gatsby-image, because the loading speed with standard img tag is slow. However, the issue I am facing is that it just won't work as I tried to us

View details »

typescrpt error: Type 'ITreeNode<{}>[] | undefined' is not assignable to type 'ITreeNode<{}>[]'

I have a react component and within that react component, i am using blueprint.js Tree fucntion to render a tree based off a json object returned from the server. I am getting a type issue that I am

View details »

React useState() doesn't update value synchronously

React useState() doesn't update value of the variable if called just after setting value. I read about useEffect(), but don't really know how this will be useful for this particular scenario. Code

View details »

Toggling a button to be disabled/enabled in UI

I am working on an application which is built on spring boot and react JS.Now they are planning to retire this application and asked me to disable few features in the UI part like disabling an optio

View details »

React Bootstrap Navbar wont align right

Want a fixed header in application with appname to left and menu optios to Right, search in middle (exactly like stackoverflow header). Instead what is get is everything aligned to the left. Also

View details »

How to access props in function?

I have problem with accessing props from function. Here is my code(the component where all this is contained is also a function): const [anchorEl, setAnchorEl] = React.useState(null); function ha

View details »

When creating buttons for each item in an array in React, how do I pass in unique onClick parameters based on the array value?

I am creating a button for each string an an array (ie. majorDivisions = ["upper", "lower"]). I need each button to have an onClick function with parameters equal to the unique value (ie. "upper" or

View details »

Customize existing NodeJS package

I'm trying to customize react-metismenu package (node package), I did customize it successfully, but it won't update no matter what I did. I did try to build the package from the source

View details »

`window.removeEventListener('keydown')` doesn't work in react hooks function

I am using react hooks inside a stateless component. Below is the source code: const MyComp = ({focused}) => { ... const keyPressListener = (e: KeyboardEvent) => { console.log('key press:', e);

View details »

HTML Text is disappeared due to overlay

I am new to HTML and CSS. I created a svg graph. I wang to place the text(Y axis label) to the left of the image. However, when I try to set x and y , the text is disapperaed once it is overaly with

View details »