title: docx file generation and download in reactjs app
body: <p>I have been told to adapt a react frontend with a firebase backend and hosting to be able to generate docx or xlsx files from cart-like information, much like a receipt. The user has to be able to download such generated file and that file doesn't need to persist after the user has generated and downloaded it. The docx or xlsx file needs to follow a certain template, so most probably I will need to style and customize the receipt-like output from the code (borders, margins, etc).</p>
  
  <p>My current problem is that i am lost and confused on how to approach this: I have found some react libraries that generate docx files (<a href="https://github.com/nitin42/redocx" rel="nofollow noreferrer">redocx</a>), but it seems they generate the file inside the directory where the frontend is hosted, and I do not know how to continue from there. It also seems that the styling it is able to do is not enough, but this is not as important as being able to generate it and prompt the download.</p>
  
  <p>I have also thought of developing a express or similar backend that manages the file generation because I have been told that in the backend it should be easier to handle it, so this is also a possibility.</p>
  
  <p>What is the standard way to approach this kind of problem? Are there any free tools or libraries that help with this?</p>
  
  <p>Thanks!</p>