Open garygreen opened 4 years ago
Reference this line and serialize import:
serialize
https://github.com/postlight/trimmings/blob/d5e4b12616e01611564bb4356b4b47f1273f62de/src/utils/loadElement.js#L19
If the element is a form then couldn't this just be simplifed as new FormData(element) and pass that onto fetch ? There's no need to manually serialize form and it's elements...
element
new FormData(element)
fetch
Reference this line and
serialize
import:https://github.com/postlight/trimmings/blob/d5e4b12616e01611564bb4356b4b47f1273f62de/src/utils/loadElement.js#L19
If the
element
is a form then couldn't this just be simplifed asnew FormData(element)
and pass that ontofetch
? There's no need to manually serialize form and it's elements...