DEV Community

Discussion on: You May Not Need Controlled Form Components

jesseskinner profile image
Jesse Skinner

Good points! Another nice vanilla-JavaScript way to get data from all the inputs in one object, useful for sending to an API, is by using:

const data = Object.fromEntries(new FormData(
swyx profile image
swyx Author

thanks! good trick i'll probably use in future.