Skip to content

Tag: reactjs

How to make modal re-render when array is updated

I’m pretty sure this is a simple issue but its stumped me. Run down: Essentially I have a list of files displayed on a table as table cells. When one is selected it becomes highlighted and is added to an array, I also can remove an item from my array by clicking again on it. Then Once I hit a

heroku build failed on deployment

I am trying to host my React application on heroku but I keep getting the following errors: I have tried to do both –legacy-peer-deps and npm install –force but my build keeps getting failed. Is there a way to fix this recurrent problem. Answer I had to update the peer dependency for credit-card-i…

How to access to tag style with React.js

I want to change the background color by changing the page width by conditionally writing, but to do this I need to be able to access the styles If we wanted to write this code in JavaScript, it would be like this: But what if we want to write this code with React and functional method? Answer I would suggest

how to map an api into a paragraph

Hi I am trying to map an array of an api to display paragraphs for every index within the array. However I keep getting an error : **> TypeError: undefined is not an object (evaluating ‘post.game_indices.version.name’)** But when I console log post and use my buttons below it displays what I wa…