skip to Main Content

Reactjs – Many to many post request DRF

Currently I am trying to figure how the post request needs to be structured to create an object in watchlist. My models.py contains two models that are linked together via stock. class Stock(models.Model): model_number = models.CharField(max_length=100, unique=True, default="") model =…

VIEW QUESTION

Javascript – State update creates infinite loop

Why does assigning the setTimeSlotsList(fetchAPI(day)) create an infinite loop? The code flow seems to be working when I just console.log(fetchAPI(day)) for testing. const [timeSlotsList, setTimeSlotsList] = useState([]) function FormValues () { const { values } = useFormikContext(); const day =…

VIEW QUESTION
Back To Top
Search