Hi there! How have you been? Hope great!
Well, I have reached a point in my mind where I want to add some elements to the MainScreen component and to refactor it properly, because now separation of concerns sucks and there are some variables or console logs left!
The main screen as I am imagining it should look like a list of posts looking like the list of emails in Gmail. There should be the image of the author, the title and date of the post and underneath maybe the category and if it has comments there should be and icon with a counter of comments!
I used an excellent (and free! wireframing online tool – of course it has paid features too, duhh) called Mocking Bot! Marvelous! It has a ton of features for free and a ton of features paid too, I suppose! USE IT! It is worth it! Ok, here is what I have in mind for the Main Screen at the moment:
This is a prototype of course, do not expect miracles at this point.. The button Load more is supposed to load the next 10 or remaining posts in the feed! I saw that WP API is paged like this: no need to change this, I like it! I am thinking that on pressing the button we make another call to the API but this time to the second page and so on! Not bad at all…
PS: For the title Modern Web etc we need to make another call to the API (if there is exposed somewhere, more likely to an endpoint for General settings, because this is the Site title field for WP).
The Settings endpoint probably need authentication, so I hard-coded the string:
Modern Web Development and more… • A developer’s journal
which is the Site Title in General settings tab!