To download a file with React. js, we can add the download attribute to an anchor element . We just add the download prop to do the download. If we don’t want to use an anchor element, we can also use the file-saver package to download our file.24 May 2021