You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am from Rails world and now considering to try Inertia.js and trying to understand how to deal with relations presented on the page.
For example on the Post page we show its title description and comments which is has many relation to Comment model.
There is a two scenarios in this case:
How to deal with creating a new comment for current Post? Is this should be some CommentsController and after successful creation we should redirect back from backend? Or it should be dedicated Posts/CommentsController and we should redirect to a specific post?
How to deal with pagination or infinite scrolling of Comments on that page if there are too many of those? Should we add a comments_page params and do a partial reload or it should just axios call to json API?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
I am from Rails world and now considering to try Inertia.js and trying to understand how to deal with relations presented on the page.
For example on the Post page we show its title description and comments which is has many relation to Comment model.
There is a two scenarios in this case:
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions