Skip to main content

All Questions

Tagged with
0 votes
1 answer
49 views

How to pass data between functional components with props?

I want to pass data {name} from Contact.js to Profile.js. I tried to use props to pass the {name} data but I couldn't. I am doing something wrong but I can not figure it out. .. I can write the name ...
Onur Alemdaroglu's user avatar
0 votes
1 answer
648 views

What is difference Between Functional component , pure class component in React? [duplicate]

I am trying to understand when to use React pure components and regular components. Components come in two types, Class components and Function components. iam confused by these words class component, ...
Janani's user avatar
  • 125
0 votes
1 answer
40 views

How make partial component which share one logic?

I created baseModal for my project, which takes arguments like header , body, footer as props. The problem is, when i have actual modal, which should have searchbar in header , and body that will ...
user avatar
0 votes
1 answer
48 views

React Component - Input Fields from Form Not Using UseState Properly

import { useEffect } from 'react'; import AddRecordButton from './AddRecordButton'; const AddRecordForm=()=>{ const [content, setContent]=useState([]); const [artist_name, setartist_name] = ...
Christine Hoang's user avatar
0 votes
1 answer
56 views

Calling two functions onClick in React, functions work independently but not when called simultaneously

I have a nav with buttons, each representing a category. When a button is clicked, the setActive function which is passed to the nav component as a prop from a parent file triggers a different ...
Greg West's user avatar
1 vote
1 answer
89 views

Get component value from child component in React

I have created drop down/lookup components for a form, each stored as a separate file under a components folder. At the moment the list of items in each component is fed from an array within the ...
TheRustyCoder's user avatar
1 vote
2 answers
91 views

facing problem in state after filtering in my create-react app

I am new to react and I am making Note-keeping application using react and firebase. Data is properly store and retrieve from firebase and rendering properly on UI. I have an Input filed on Navbar to ...
Pankaj Asiwal's user avatar
0 votes
2 answers
32 views

State update issue in reactjs

I am creating CRUD Application using React to manage users. I fetch the user data from 'https://jsonplaceholder.typicode.com/users'. I tried to delete data using the fetch DELETE method but it doesn't ...
Pankaj Asiwal's user avatar
0 votes
1 answer
88 views

Grid Game - Should I try and break this React component down? [closed]

I'm having a go at creating a top down grid game as a way to learn react and test out my newly learned skills. I have created a version that has some basic mechanics; -click and dragging on cells ...
Drew Killingley's user avatar
1 vote
2 answers
31 views

React rerendering

I have component const ComponentA: React.FC<ComponentAProps> = (props) => { const [invalidFields, setInvalidFields] = React.useState([]); return ( <ComponentB invalidInputs = {...
Feuerschinken's user avatar
0 votes
2 answers
31 views

How to stop a component from recursively showing up in react Typescript

I have a parent component Form that has a button where on user click, it will display a child component MyWindow. The MyWindow component also has the Form component so the button will appear in ...
Barry's user avatar
  • 276
0 votes
1 answer
98 views

Pass Data From Component To Page In React Js

I want to pass data from a component to another page in React, the component named Country.js has the data I fetched in my app component from an API as a prop, I used react router to create the second ...
Ma Nar's user avatar
  • 1
0 votes
1 answer
46 views

How to reuse a cart button in another component

Im new to React and trying to reuse a cart Button which I made for store, in Navbar and update it. here is my Store component. I tried to import All the involving components in Navbar as well and ...
Jay's user avatar
  • 1
0 votes
1 answer
220 views

Uncaught TypeError: Cannot read properties of undefined (reading 'length') in the submit form

I want to show my todo in the console when pressing the "Agregar" button, but I get the following error: Uncaught TypeError: Cannot read properties of undefined (reading 'length'), could you ...
Gaxt Zerpa's user avatar
0 votes
1 answer
43 views

How to access data inside of a useEffect block from outside of it?

So basically, I have a DateView component from which I retrieve a date in a ChooseCalendar component. However I have the code that retrieves this data from DateView in a useEffect block because I'm ...
SKYZE's user avatar
  • 99

15 30 50 per page
1
2 3 4 5
17