menu
announcement

Spectrum will become read-only on August 10, 2021. 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

April 20, 2021 at 10:26pm
I am not a beginner but I can not fix this error.
  • reply
  • like
Please help me any body.
  • reply
  • like
That was working on react 16.13 but return that error on react 17
  • reply
  • like
Help me!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  • reply
  • like

April 22, 2021 at 2:52am
But there is no conditionally call or nested functions.
could you show your code?
  • reply
  • like

May 11, 2021 at 7:40am
Hi Guys this is my code, in this i am facing one issue after clicking on AudioCard the audio is not playing in first attempt after clicking second time this is working. Can anyone help me with this?
  • reply
  • like
send me code
  • reply
  • like

May 11, 2021 at 3:29pm
I think you should handle playingSong state by useEffect hooks. like this:
const playSong = () => setPlayingSong(require(`.../sound/${title}.mp3`));
useEffect(() => {
if(playingSong) {
const audio = new Audio(playingSong);
dispatch({
type: "PLAY_SONG",
currentPlayingSong: audio
});
audio.play();
}
}, [playingSong]);
Edited
  • reply
  • like

May 13, 2021 at 12:50pm
Afternoon lovely folk - i'm making my signup page a protected route, (so only registered users can make accounts for new users). I'm having trouble with persisting the state of the current user, when a new user is registered it replaces the details of the current logged in user.
  • reply
  • like
Afternoon lovely folk - i'm making my signup page a protected route, (so only registered users can make accounts for new users). I'm having trouble with persisting the state of the current user, when a new user is registered it replaces the details of the current logged in user.
signup = (userInfo) => {
return todoAxios.post("/auth/signup", userInfo).then((response) => {
const { user, token } = response.data;
localStorage.setItem("token", token);
localStorage.setItem("user", JSON.stringify(user));
if (this.state.user && Object.keys(this.state.user).length === 0) {
this.setState({
user,
token,
});
}
return response;
});
};
Edited
  • reply
  • like

May 22, 2021 at 12:09pm
how can i deploy a reactjs spring boot , mysql application for free. PS: it's my first time trying to deploy something. thanks.
  • reply
  • like

May 24, 2021 at 7:23pm
You just want to deploy a react app? Try using Vercel.
  • reply
  • like

May 31, 2021 at 1:01pm
Hello Everyone. I have this error everytime I upload big img files. I am using Redux persist. I dont know how to fix it everytime the storage if full. Hope anyone could help me.
  • reply
  • like

June 2, 2021 at 3:35pm
did you try to compress your file before store it ?
  • reply
  • like
how would I know if its compress or not? Thank you for your reply
like-fill
1
  • reply
  • like

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?
  • reply
  • like

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??
  • reply
  • like

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