I've been searching for a while now on how to integrate js.erb files into my Ruby On Rails 7 project, but I haven't been able to find any helpful information. Have js.erb files become obsolete in Rails 7? If so, is there a way to include partials in the javascript files of import map?
My goal is to create a JavaScript function that updates the "like" count on a post by fetching data from a table and updating the element's text using a Ruby partial.
If anyone can provide any resources or point me in the right direction, it would be greatly appreciated!