react-component Questions

5

Solved

I'm building a form with an auto filling text box using react-select and formik. <Formik initialValues={{ assignedTo: task.assignedTo, }} onSubmit={(values) => { const updatedTask = { ....
Sammy asked 25/7, 2018 at 12:28

6

Solved

I have just started learning react and I was watching a tutorial which deals with state and hooks. It just deals with updating time every 1000 milliseconds (or so I thought). import React from &quo...
Dredge asked 10/8, 2020 at 3:50

3

Solved

I have a parent component which looks like this: const Parent = () => { return ( <Child_1 /> <Child_2 /> ); } if any changes occur in one of the child components, will the Pare...
Tedmund asked 28/5, 2022 at 21:7

2

the useState hooks are great. I mainly use the useState hooks to initialise certain states, and I also pass the function to children components to change the states. However, I realise I am startin...
Superable asked 1/7, 2020 at 16:46

7

What is the definition for "parent component" in React? eg. const A = () => { return ( <B> <C/> </B> ); } Is A the parent of C? Is B the parent of C? Follow up...
Twist asked 9/3, 2022 at 22:41

4

Solved

The UserForm which is controlled by another controller complains on console as "Warning: A component is changing an uncontrolled input to be controlled. This is likely caused by the value cha...
Punchy asked 23/10, 2021 at 16:52

6

Solved

I'm using Pressable for buttons after referring this docs pressable docs Now I want to add ripple effect to the button but it is not working properly. <Pressable android_ripple={{color: 'red',...
Bulldoze asked 23/7, 2020 at 6:29

9

Solved

What are controlled components and uncontrolled components in ReactJS? How do they differ from each other?
Acervate asked 1/3, 2017 at 3:15

2

Solved

I created a event-box component in react. What I want is whenever is it called, I passed color values as props which later get used to set its border. Currently, I set two hardcoded class names and...
Voyageur asked 15/4, 2020 at 10:39

6

Solved

I use the following code to create a login page with form validation: import React from 'react'; import { Button, Form, FormGroup, Label, Input } from 'reactstrap'; import { useForm } from 'react-h...
Tubulure asked 6/8, 2020 at 20:32

1

Solved

I have an app that pulls data from a GraphQL database and then .maps it into custom form components (quantity number textboxes). Right now, the components themselves are holding state of their indi...
Hateful asked 26/8, 2022 at 5:45

8

Solved

I'm facing an issue with material-ui drawer. I've changed the width of the drawer container which causes a a problem . The drawer remains a little inside the page and visible but I don't want to ma...
Handley asked 30/4, 2018 at 10:44

3

I am trying to create a DetailsList with sortable columns (similar as the example in the documentation here: https://uifabric.azurewebsites.net/#/controls/web/detailslist), but instead of a Class c...

1

Someone please explain me this last paragraph of the React documentation with a simple example, it's about React.PureComponent , all the examples I've seen are advanced and I'm just starting to kno...
Pomerleau asked 27/5, 2022 at 18:20

2

Solved

I was following the tutorial but I unexpectedly got this error, does anyone see what is going on? Here is the full error: react_devtools_backend.js:2557 react-beautiful-dnd: A setup problem was en...
Lithiasis asked 11/5, 2021 at 18:12

1

I'm building a website using Next.js, and currently I'm trying to get a simple function to run when pressing a key. The problem I'm having is that the onKeyDown event isn't being triggered like I e...
Synergetic asked 24/3, 2022 at 13:19

3

Solved

Using Nextjs and I've created an index.js in the /pages directory and created meta.js in the /components/meta/ directory. As my app rebuilds I get the following error: Element type is invalid: ...
Scary asked 30/12, 2018 at 22:5

1

I've got a component which consists of an object, which contains an array of objects, which in turn has keys and strings this.state = { dinosaurs: [ { era: "jurassic", name: "diplodocus", diet: ...
Labyrinthodont asked 6/11, 2018 at 0:6

4

I am using i18next and react-i18next in a react native application, more specifically with input validation. I am trying to pass the t() as a parameter in a no component and i am receiving the erro...
Middleman asked 30/12, 2020 at 15:34

2

Solved

I am absolute beginner in react. I have to pass particular property to all the components inside the div without passing them into individual, For Example, Instead of doing this: function App() { ...
Tympanist asked 19/12, 2021 at 6:4

3

Solved

I have component structure like this src --App --DataTableComponent --ButtonComponnet axios --useAxios On app load I am calling Axios library in DataTableComponent (through custom hook useAxio...
Pilgrimage asked 17/12, 2021 at 18:26

9

Solved

I have a page which renders different components based on user input. At the moment, I have hard coded the imports for each component as shown below: import React, { Component } from 'react' imp...
Imago asked 15/1, 2018 at 18:10

2

Solved

I am able to use the autocomplete by selecting values from the list. Now I want to add a new value in the selection. I tried multiple options including onChange but couldn't implement. If user ...
Dishwasher asked 5/5, 2020 at 20:28

4

Solved

This question has been going round and round in my head since I read the release notes (and other related hype) around React 0.14 - I'm a big fan of React and I think that stateless components (htt...

7

I want to use useStyle to style the Class Component . But this can be easily done hooks. but i want to use Component instead. But I cant figure out how to do this. import React,{Component} from 'r...
Operatic asked 12/6, 2019 at 4:14

© 2022 - 2025 — McMap. All rights reserved.