Skip to main content

All Questions

Tagged with
0 votes
0 answers
328 views

Unexpected identifier in pm2 while using Express

I am using a vServer for my project, where I run my node backend with pm2. While developing I can open port 80 and 443 on localhost and everything just runs fine. When I uploaded my code to the server ...
Ruffyg's user avatar
  • 143
0 votes
2 answers
262 views

Spread operator is only inserting last item in the object in useState

I've been trying to get questions from an API for my quiz website I want to push the questions that are being returned from processData function inside the questions list that is in the data object. ...
Tej's user avatar
  • 11
2 votes
1 answer
341 views

easy-peasy: useStoreState not working with ES6 class instances

In easy-peasy, the useStoreState() hook does not cause a re-render when we use the hook to access the store's field that stores an ES6 class instance. For example: store.js import { action, ...
AnsonH's user avatar
  • 3,345
-2 votes
1 answer
188 views

What happens if you send an instance of an ES6 class via REST API?

class Data { #some_private_var constructor(private_val, regular_val) { this.regular_var = regular_val this.#some_private_var = private_val } } For example, if I use Axios to make an ...
Bear Bile Farming is Torture's user avatar
0 votes
2 answers
373 views

How to nest the class of parent component in child component?

I'm in a learning phase of react and I've been trying to nest style of parent in component in child component via class in react.js. How to do it? What I've tried until now: function Card(props) { ...
 अंशुल's user avatar
0 votes
1 answer
60 views

implement an export and it's sub export in react

I meet opensourced ts library component and its sub components like following pattern: import {Box} from 'example/box'; //in react <Box> <Box.Left> Left </Box.Left> &...
StevenWang's user avatar
  • 3,846
0 votes
1 answer
168 views

How to show value from 2 promises in a single line?

I have a class with static methods returning promises. I am able to print in console the values returned by these promises in seperate lines. But I want to print in console in one line the weather and ...
curious_Coder's user avatar
0 votes
1 answer
614 views

Error is being thrown claiming that a method created in an axios class is not a function

In my react application, I'm defining an Axios class with a bunch of methods, but the methods are not being recognized as functions and throwing an error. Showing is easier than explaining so... I ...
anthony galligani's user avatar
0 votes
2 answers
2k views

With React ErrorBoundary, I want to reset hasError from an internal function

I'm not that good at JavaScript classes (as I use functional components almost exclusively). I have a slight modified ErrorBoundary class that I've mostly pasted from the React docs. I have code that ...
Peter Kellner's user avatar
2 votes
1 answer
297 views

Problem reading state from React child Components using child->parent callback register model

I'm maintaining a legacy Class based React project and introducing functional components in as I go. One of the workarounds to try to avoid a total rewrite is to allow child components to communicate ...
NEIL STRONG's user avatar
3 votes
2 answers
4k views

How do I change a value in an instance of a Typescript class?

I have a Fruit class: export class Fruit { constructor(public id: number, public name: string) {} public changeName(_name: string): void { console.log('changing name') this....
Jar's user avatar
  • 2,040
0 votes
2 answers
2k views

How do i compress any image and Excel and CSV files in React js

i need to compress all types of files using React js Please help Currently there is Compressor.js for image compression but i need CSV Excel files also to be compressed
Abhijith Vijayan's user avatar
-1 votes
1 answer
76 views

Error Converting a React Class Component to a Function Component

I am trying to convert this demo into a function component. I am following these steps and I am stuck with the following: Class version: this.appointmentForm = connectProps(...
Kahalon's user avatar
  • 119
1 vote
1 answer
598 views

Why does this getter method has been called several times in React?

I have a Store which will be provided to the component. In this Store file, there are several getter function. But I find only this getter function will be executed three times since this....
wei wang's user avatar
  • 155
0 votes
1 answer
119 views

WHY does the this binding break in React?

I am following a tutorial about es6 classes and React class components. I understand when new class methods are created, the this keyword can be used to run other methods in the class and to access ...
j obe's user avatar
  • 2,059

15 30 50 per page
1
2 3 4 5
12