DEV Community

Discussion on: Can react be used as a utility full stack web app?

Collapse
 
bgadrian profile image
Adrian B.G.

If the source is public you can just write the scrapper in JavaScript and run it on the client side.

  • fetch the external html
  • parse it (with jQuery or something)
  • get the data from it
  • put the data in a model
  • send the model in the React state

React has nothing to do with your problem. It will just output your data, its only job is to render the HTML, not deal with your business logic.

Thread Thread
 
presto412 profile image
Priyansh Jain • Edited

Yeah this was what I was planning to do, cause we maintain a server that does the Parsing and aggregation that uses Express, and now we don't really want to lol.
React does happen to use NPM right? All the libraries we use for parsing and stuff are npm packages, so that's why this came to my head.

Thanks!

Thread Thread
 
bgadrian profile image
Adrian B.G.

you can avoid npm by just adding the react as an external dependency, like we did in the old days :))

<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>