title: Where to do processing/calculations in a react web app
body: <p>I made a post recently, and it seems my question was poorly constructed. Now, I think I have a better idea of what I want to ask.</p>
  <p>I am posting the following diagram that I am using in order to better understand the system:
  <a href="https://i.stack.imgur.com/DXD1V.png" rel="nofollow noreferrer">diagram</a></p>
  <p>So let's say I have some JavaScript file that contains functions that do some calculations, specifically using some values the user will input on their end. Let's assume the code contained in this JavaScript file is not able to run on the browser (nor would I want it to), and is not inside my react app src folder.</p>
  <p>The only functionality I want is for the user inputted values to be sent &quot;somewhere&quot; (server?), and from this &quot;somewhere&quot; we are able to call upon the functions defined in this separate JavaScript file passing in the user inputted values, grabbing the result, and then communicating that result back in order for the browser to display it.</p>
  <p>Where exactly is this &quot;somewhere&quot;, and inside this &quot;somewhere&quot; what exactly would it look like to do what I've described. I am using a node and the server is in JS.</p>
  <p>I've been reading this to get a better understanding of the whole system <a href="https://developer.mozilla.org/en-US/docs/Learn/Server-side/First_steps/Introduction" rel="nofollow noreferrer">https://developer.mozilla.org/en-US/docs/Learn/Server-side/First_steps/Introduction</a>, but it seems any sort of processing like this has been left out.</p>
  <p>Any help would be much appreciated to assist me in understanding how this should work. Hopefully I am making a little more sense.</p>