menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

React

A community of developers, designers and others who love React.js. ⚛️

Channels
Team
Show previous messages

June 8, 2021 at 10:47pm
Hi, i'm trying to add an avatar upload field to the contact form - to this: https://github.com/redhulkrko/ContactFox
Can anyone help me determine the basic changes required to ContactState.js, contactReducer.js and ContactForm.js
I understand Content-Type have to be changed to multipart/form-data?
I think then at some point I would need to set const formData = new FormData();
To append the file? Not sure where I would do that in ContactState.js or ContactForm.js?

June 22, 2021 at 10:27am
hey developers, i like to know why create-react-app dose not let us to create and use folders and logics out of SRC folder? has this a reason? what if we want to do that, what should we do or why should not we do??

July 8, 2021 at 11:10am
Does anyone know if it's possible to disable reacts built in html sanitizer?

August 2, 2021 at 2:31am
hi all, good day, I am new to react and need some help from community to see if there is any online resource to solve my problem. I have array of objects it has id, title, description.. I want to show the data as card and when I click on next and previous button, I want my data to change .. can please anyone help me
anyone

August 2, 2021 at 10:38am
my handler has got some bug i think it does not work smooth
so far i did this much export const UserCardDetails = ({ data }: Props): JSX.Element => { const [current, setCurrent] = useState(0); console.log(current1 ${current});
const onNextClick = (idx: number) => { setCurrent(current === idx ? 0 : current + 1); console.log(setCurrent ${current}); }; const onPrevClick = (idx: number) => { setCurrent(current === idx ? 0 : current - 1); console.log(setCurrent ${current}); };
const res = data.map((slide, idx) => { return ( <Card key={slide.id}> {idx === current && ( <Card.Body> <Row> <Col style={{ paddingBottom: '20px' }}> <FaArrowAltCircleLeft onClick={() => onPrevClick(idx)} style={{ float: 'left' }} /> <FaArrowAltCircleRight style={{ float: 'right' }} onClick={() => onNextClick(idx)} /> </Col> </Row> <Row> <Col> <h5>{slide.title}</h5> </Col> </Row> <Row> <Col> <img src={slide.url} alt={slide.title} /> </Col> <Col> <p>{slide.description}</p> </Col> </Row> </Card.Body> )} </Card> ); }); return <div>{res}</div>; };

August 15, 2021 at 8:28pm
@ call me

August 19, 2021 at 6:11pm
How does react works when creating a function but was never called, but the import to a file works on the return

August 20, 2021 at 12:59pm
i want to count the number of checkboxes while selecting using class component how to do it can somebody help?
Edited

August 20, 2021 at 10:05pm

August 23, 2021 at 7:03am
getting blank white screen in iphone using firebase cloud messaging!

August 23, 2021 at 9:58pm
anyone with deploying experience? :)