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 will show us nav items
like
posts
and profile
.
- You can design a suitable UI in React to display the list of posts. A sample
UI is given below. Each post should be in the form of a card component. Each
card should display the title and a preview of the description. If the preview
exceeds one line, 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.