Audiophile | React | Firebase | Jest | ReactTestingLibrary | ReduxTool
Design comparison
Solution retrospective
I had great fun completing this project. It took me a while due to work and other things. But it gave me a great opportunity to learn and develop my skills.
If you have any questions as to my methods, or you wish to give me some feedback, please feel free.
Questions
-
How is the speed of my website? I am currently in China and have to use a VPN to view the website and my database is hosted in Europe, so when I view the website, it is pretty slow.
-
Do you think it would be better to import all of the data from Firebase when the client first accesses the website and then store it in state to improve speed when changing page? Or should I just keep it how it is?
-
Should I store the assets for the home page in Firebase as well?
-
Should I just store the Firestore storage location into a Firestore document and load images like this, or should I use getBlob to get my images? Why? I assume getBlob is just for getting the url after uploading it so that you can add a reference to the Firestore DB, but maybe I am wrong here. This confused me quite a bit.
-
What do you think about the readability of my code?
-
Any feedback on my testing would be greatly appreciated.
-
Any feedback on anything else would also be greatly appreciated.
Also, if you want my feedback on one of your projects, let me know when you give me feedback. Thanks.
Community feedback
- @Kamlesh0007Posted over 1 year ago
Answers to ur questions:-
- Do you think it would be better to import all of the data from Firebase when the client first accesses the website and then store it in state to improve speed when changing page? Or should I just keep it how it is?
-> Whether to import all of the data from Firebase when the client first accesses the website and then store it in state to improve speed when changing page depends on the amount of data and how frequently it changes. If the data is relatively small and doesn't change often, then it may be a good idea to import it upfront and store it in state. However, if the data is large and frequently changing, then this approach may not be practical and could actually slow down your website.
- Should I store the assets for the home page in Firebase as well?
-> Storing assets for the home page in Firebase can be a good idea, especially if the assets are large and slow to load. However, you should also consider the cost of storing and serving the assets from Firebase, as well as any limitations on the amount of storage and bandwidth that you have available.
Marked as helpful1@arfarobsPosted over 1 year ago@Kamlesh0007 Thank you so much for your feedback.
I agree with what you say about downloading all of the data when a client first enters the website.
My way of thinking is that for this project website, it will never have more than 6 products, so it will not have to download and store a massive amount of data in the app's state. So, to make this specific portfolio project faster, I could download the data when a client first enters the website.
However, looking at it from an employers point of view, if this was a real website, then we may expect more products to be added in the future. So, for that reason I choose not to download all of the data as soon as a client accesses the website.
In regards to your second piece of feedback, I don't fully understand what you mean by the following: "Storing assets for the home page in Firebase can be a good idea, especially if the assets are large and slow to load." I would have thought that the assets will load much faster if they are stored locally in the repository rather than on Firebase.
If they are stored on Firebase, then surely the client will have to wait longer for the application to communicate with Firebase and download the assets?
Perhaps, I'm wrong or have misunderstood what you mean. If so, apologies, I've still got a lot to learn haha.
0 - @graynnejiPosted over 1 year ago
Alright thanks... its actually this challenge I need help for. here is the link you requested for https://github.com/graynneji/audio-ecommerce-app
0 - @graynnejiPosted over 1 year ago
I have been trying to display my images in the asset folder but I keep getting Module not found, the only way I was able to load my images in my react app is when I upload those images in a server and I use the URL but when I want to load them locally I get that error except i import the image and I cannot import all images in all my components
0@arfarobsPosted over 1 year ago@graynneji Hey. I assume your asking for help with one of your projects, right?
If so, send me a link to your repo and I can try to help you.
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord