In side project task 2, we experimented with validations and the Rails console.
This task will be mainly dealing with controllers and actions.
Task 3
- At this point, you should have a
Post
model and corresponding validations.
Now add a posts controller with index
action to list all the posts.
- Integrate React to your Rails app as outlined in the preceding chapters.
- Create a
Navbar
/Sidebar
component that displays navigation items such as Blog Posts
and other upcoming navigation items.
- You can design a suitable UI in React to display the list of posts. A sample UI is provided below. Each post should be represented as a card component. Each card should display the title, a preview of the description, and the date it was created. If the preview exceeds two lines, it is recommended to truncate the excess description using an ellipsis to ensure a cleaner and more concise display.
You can depend on
NeetoUI for assistance,
as developing custom components from scratch can be a laborious and
time-consuming process.