My-ReadIt app!

Hey everyone!

I’m really proud of this one :slight_smile: I just finished first version of this project. Links below:
Code repo: https://github.com/beyer96/readit
Deployed app: https://my-readit.netlify.app

I think I’ll come back to it soon to redo some small details, but all-in-all it works nice already I think :slight_smile: It was really challenging project for me because of two things:

  1. At the begginning I realized I totally misunderstood the whole concept of Redux :poop: So first one or two days I spent at Youtube tutorials and here on Codecademy lessons…

  2. Reddit API (either official and unofficial JSON API) is really poorly documented in my eyes. It was very hard for me to realize, which endpoints to use and how to fetch data and which of them. This is the reason why my app probably still isn’t able to fetch all types of data (i handled that with mentioning link to original reddit post).

In Lighthouse, I reached all values over 90, except of ‘performance’ (got around 38% for mobile and 76% for desktop). As mentioned in instructions - I guess this is mainly because of fetching and displaying large images. If anyone knows, how to get higher performace, I will be glad for any advice :slight_smile:

Duration of the project: from ‘create-react-app’ command to deployment, it was about a week of learning, reading, watching YT tutorials and also - coding :slight_smile:

Thanks for any respond, have a nice day everyone! :slight_smile:

2 Likes

Looks good, I’ve done one where You have to login to reddit to show content, didn’t put too much attention to details, but hey as long as it works :smiley: :stuck_out_tongue: https://suscodered.netlify.app/

Exactly - as long as it works… :smiley: Nice job also! Just one detail - after giving permission and getting access token in url, I have to refresh the page, so I can fetch the content - is that how it’s supposed to be? :smiley:

Do you have link to your repo? I would like to see it if you don’t mind :slight_smile:

Hey, I’ve noticed the problem You described while visiting the site on mobile, doesn’t happen on pc for me. Wasn’t sure why does it happen tho.
Here is my repo

Hey @wfarat,

I just looked at your repo and try to redo it a little. Changes I did:

  • In App.js, in useEffect on mounting effect there’s new func ‘checkForToken’ which only checks if it can get accessToken and (if so) returns it
  • In App.js also, I added original ‘getAccessToken’ func as onClick event for all your
  • tags - this is the place, where you fetch accessToken, if it is not already fetched
  • In Reddit.js you can see new ‘checkForToken’ func and ‘getAccessToken’, which both work with sessionStorage property

For sure you could save some lines and write it prettier, but for quick redo I think this works nice. See pics below to get the better idea :slight_smile:

App.js

Reddit.js

EDIT: In case you (or anyone else reading this) are not familiar with sessionStorage, I add screenshot, where you can check values stored in there. If you open DevTools → ‘Application’ tab, you should see it in Storage → Session Storage like bellow

1 Like

Welcome to Readit ! A beautiful, well-crafted reddit app for the Windows Platform. From features like secondary tiles, a stunning interface, and complete …Once users open the READIT app, their screen opens to a simulated text messaging space bar clicker screen, with a conversation already initiated and users read through someone’s chat history. Users tap the screen to read the next text message, and carry on this way throughout the story