Skip to content

Send Select without a form with GET method not working... React #1774

Discussion options

You must be logged in to vote

I think it's just an issue with how you're using the React state. When you call handleSubmit within the handle change function, it's still using the previous value of data, because React hasn't re-rendered the component.

To resolve, you'd either need to use a useEffect watching the value of data, or use router.get within the handleChange function.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@vitalijalbu
Comment options

Answer selected by derrickreimer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants