Skip to content

Tag: reactjs

For Loops and React JS

So I have this function here: and its suppose to insert list items into and unorder list from an array of card objects. If I do a console.log on arr I can verify that it is an array of cards, but if I console.log card from inside the for each it does not even trigger. It’s like the for each

Why does this GET request create infinite loop? (React)

First, please look at the code. The problem happens with this following code. When I add actionItemArray in the second argument array, It keeps looping these two console.log events. When I delete actionItemArray from the second argument of useEffect Hook, I have to refresh my page to added, deleted and edited…

Fetching data in loop next js

I am attempting to use the data from 1 endpoint to call another endpoint that is filtered by id. I am planning on fetching both calls using getServerSideProps and passing the data to another component. The first call will return an array of categories which then I am attempting to loop and fetch articles that…

When trying to use Card of Reactstrap I get Warning: React.jsx: type is invalid — expected a string (for built-in components) or a class/function?

I tried to import the Card component from the Reactstrap library, and unfortunately this has resulted in the error below. When I remove the element, the page works again as intended. IMPORTS (IN PROFILE COMPONENT): EXPORT (AT BOTTOM OF PROFILE COMPONENT): In APP.js router: Full Profile component: Answer I thi…