Questions tagged [react-props]

ReactJS is a JS library developed by facebook. Props are the variables to be used in react components. Use tag when having doubts regarding usage of react props.

Reactjs is a JS library developed by facebook. React relies on making of components which handle variables through props.

Conceptually, components are like JavaScript functions. They accept arbitrary inputs (called “props”) and return React elements describing what should appear on the screen.

-React Documentation

3283 questions
0
votes
1 answer

How to get prop value in setIsHovering

const [isHovering, setIsHovering] = useState({box1: false, box2: false, box3: false, box4: false}); const handleMouseOver = (e,box_id) => { setIsHovering({box_id: true}); }; const handleMouseOut = (e,box_id) => { setIsHovering({box_id:…
0
votes
0 answers

get React Prop data with Python using Selenium

I'm using Python on windows and I want to get a list of elements shown in this url: https://app.teritori.com/collection/tori-tori1999u8suptza3rtxwk7lspve02m406xe7l622erg3np3aq05gawxsrh9g0p/ The site is made with React, so I'm using Selenium instead…
Juan Antonio Tubío
  • 1,172
  • 14
  • 28
0
votes
0 answers

Passing props to open modal in React js

So i try to open modal using props from react js..., i try to console log, i found that the props is passed but the modal component is not open.. here is my try: const [open, setOpen] = useState(false); const openModal = () => { setOpen(!open); …
JS24
  • 1
  • 2
  • 14
0
votes
1 answer

Passing boolean useState prop from child to grandparent react

i'm kinda new to react so im sorry for my lack of understanding. I'm trying to pass a prop from child to grandparent but i'm having some difficulties in achiving that. The main goal is to pass true/false from child to grandparent in order to…
0
votes
0 answers

Can I pass an environment variable value through a React prop to a child component?

From a helper I try to pass an environment variable process.env.script. Somehow it returns undefined in my React app? I use it like this: The helper: const config: NodeJS.ProcessEnv = process.env; const myData = { page: { title: `My title`, …
meez
  • 3,783
  • 5
  • 37
  • 91
0
votes
1 answer

How I can transfer transfered props from components?

My code component is "Busket", in which I want transfer props from "Card" component: import React from "react"; import s from "./Busket.css" import styles from "../Main/MainContent.module.css" import BusketCard from "./BusketCard"; function…
Visel
  • 23
  • 3
0
votes
1 answer

controlled Input with props

So am doing a little project where i made a user profile page to show users profiles and where the admin can update their information. i wanted to do it with controlled inputs where in the same input it shows for exemple the name of the user and the…
Aymen khlil
  • 25
  • 1
  • 4
0
votes
1 answer

I'm attempting to use boolean props: when the user clicks on the Selected button, the Select text should be hidden

and when the user clicks "Selected," show the Select,Please take a look at my code and tell me where I'm going wrong. This is the App.js file I'm working on.  import "./styles.css"; import MainShow from "./Show"; import { useState } from…
0
votes
1 answer

I want to show only the first post title for each category in Gatsbyjs allWpCategory, but it's not working as I expected

I want to show only first post title for each category in Gatsbyjs allWpCategory, but it's not working as I expected. ${post[0].title not work in loop, but ${post.title} return all the post title in each category is there any other way to do…
Devbuddy
  • 231
  • 4
  • 15
0
votes
1 answer

onInit function of PaypalButtons component is never called

Without any changes to our codebase concerning Paypal functionality, the following errors started popping up whenever we attempted to load the PaypalButtons component from react-paypal-js. With a cleared cache: An undefined Paypal SDK version seems…
codrinus
  • 1
  • 1
0
votes
2 answers

Property 'title' does not exist on type 'IntrinsicAttributes'

I have this issue when working with React and TS - when mapping an array of the dummy values, one of the properties is always red. My code: ProjectList.tsx const DUMMY_PROJECTS = [ { id: "p1", title: "My bug business", …
0
votes
1 answer

How to use props and child component in my code for listing the todolist?

I have a todolist which displays list items fetched using fetch api from jsonplaceholder page, What I want to do is instead of rendering the lisitng in same component I want to create a child compenent and use one object to be sent as a prop to the…
0
votes
1 answer

Reusable Modal in React

I have data const data = [ { id: "React", img: "https://cdn.worldvectorlogo.com/logos/react-2.svg", info: "React is the most popular JavaScript library and is used by Facebook, Instagram, Netflix, Airbnb, Uber Eats,…
Raffle.ski
  • 49
  • 7
0
votes
1 answer

my react.js app is coming blank trying to seed with an external js file

I just started studying react, so I picked up the book Fullstack react by Anthony Accomozzio et al, with the latest version on January 13, 2020. I created the react app with npx create-react-app I am stuck on the part of 'making product data…
0
votes
1 answer

Having problems using delete method in MERN stack

I am practicing using the MERN stack for the first time. I was using this tutorial loosely as a guide but I made some of my own tweaks to make the app function as a social media site. My backend code works fine, as I've tested it using Postman and…
vshjnsfns
  • 3
  • 1