React Tips & Tricks: Uploading a File With A Progress Bar

This page summarizes the projects mentioned and recommended in the original post on dev.to

SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • react-final-form

    🏁 High performance subscription-based form state management for React

  • Forms are often tricky to get right with React. While there are great libraries like formik or React Final Form to do the heavy lefting for us, handling file upload still isn't always straightforward.

  • file-upload-progress-bar

  • Finally, we need a way to submit the data. For testing purposes I've created a small API in Flask you can find it in the repository for this article. It's just a single endpoint that listens for POST requests and returns a 201.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • axios

    Promise based HTTP client for the browser and node.js

  • Now, we can't POST our Data as json because we're want to send a file and json doesn't handle binary data. We need to send form-data instead. We'll use axios to send the request, as it comes in handy to display the progress as we'll see in the next section.

  • formik

    Discontinued Build forms in React, without the tears 😭 [Moved to: https://github.com/jaredpalmer/formik]

  • Forms are often tricky to get right with React. While there are great libraries like formik or React Final Form to do the heavy lefting for us, handling file upload still isn't always straightforward.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Basic principles of Formik

    1 project | dev.to | 13 May 2024
  • Top 5 form validation libraries in React JS and Next JS

    5 projects | dev.to | 29 Sep 2023
  • Formik sucks, is there a decent lib or the best way is to build your own forms?

    5 projects | /r/reactjs | 30 Sep 2022
  • The Best React Form Library (2022)

    5 projects | dev.to | 3 Aug 2022
  • Best current libraries for complex forms?

    6 projects | /r/reactjs | 1 Jan 2022