Cmcco91
Cmcco91

Reputation: 99

Do I need a backend for my reactjs web app.?

Hi I’m building a front end web app using reactjs, my app will map over different array of dogs/cats/animals with multiple props and a couple images each. The ui has a search box which then filters out relevant animals.

My question is if my list were to get quite large, do I need to have it stored in a back end ? Or can it all be stored in front end, there will be no sensitive information or anything. So im not worried about security. I do not need to receive any information from the users. Basically it’s just a website for people to browse through.

And my second question. Once deploying to a host, Im currently leaning towards AWS. Is updating/adding/subtracting from my arrays simple as deleting the file and adding the new one into the bucket ??

Upvotes: 0

Views: 111

Answers (1)

Matthew Liu
Matthew Liu

Reputation: 319

Sounds exciting! But let's first back up a bit, and take stock of what we're trying to do. Essentially: we want an app that will show a bunch of images with functionality (e.g. filtering).

All images/photos (e.g. this cat photo) are hosted somewhere. Period. So, you can be the one responsible for hosting the images, or you could just have <img /> tags in your react app and refer to an existing img src links, where the image sources are being hosted by someone else.


So to answer your question: my question is if my list were to get quite large, do I need to have it stored in a back end ?

Not necessarily - if you're just referencing a bunch of images from a site that someone else is already hosting, then you're good.

As for this point: Or can it all be stored in front end, there will be no sensitive information or anything.

This question is kinda hard to answer, because nothing is really ever 'stored' in the front-end (let's ignore caching). Images live on the server, and the client (e.g. your chrome browser) makes requests to the server to get the images.


Now: if you want to upload your own photos or let users upload their photos. That's a very different story.

You would want to use s3 buckets. They could host your images.

However, based upon your post, I really think you should start step-step, and not host your own images (i.e. not have a backend), and instead just start by using images already on the internet. Good luck :)

Upvotes: 3

Related Questions