Skip to content

Tag: reactjs

How do I get the color of a color-picker on button click?

Background: I am trying to get the current value of a color picker when I click my onSubmit button. The color picker is in a separate component. Problem: When I change the color via the color picker, I am getting an error message that says: TypeError: _this.props.setSelectedColor is not a function Component t…

How to Render Data from a POST API call in React

I’m trying to figure out how to code my current API call so that I can access each field from the API call and render it, then be able to use it across multiple components. I’m using the QuickBase API call that only allows POST to pull field values. I’ve been out of the game for a couple of …

React infinite recursion on history.push and useEffect

I’m a little new to react and I seem to have a chicken and egg problem. I want to have a query parameter in the the browser URL be synchronized with a useState variable in the page. The problem I have is that when I have useEffect do a history.push then react updates the variable which triggers another …