Discussion

npm packages – react-copy-to-clipboard and object-to-formdata

react-copy-to-clipboard is a simple npm package which provides copy to clipboard functionality.

We can do this in pure javascript but it only copies the selected text of a input tag.

This this npm package, we can copy any text which is passed to the component as props.

object-form-data is a npm package which converts JSON structure to form data.

We can use it when we send multipart/form-data request.

Instead of making FormData object manually and adding attributes one by one, we can convert JSON directly to FormData.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *