Using ViewComponents with Turbo | predicatemethod
23-Mar-2023 784
If you haven’t had a chance to check out ViewComponents, I’d highly recommend you take a look. ViewComponents are a great way to encapsulate view-related logic, making it much easier to test and reuse.Within the application, a background job is responsible for fetching information about a podcast episode, then adding it to the user’s feed. While this is in process, a ViewComponent is used to display to the user how many episodes are currently importing. If there are no episodes importing, then it simply renders nothing.
Using ViewComponents with Turbo | predicatemethod #ruby #rubydeveloper #rubyonrails #Using #ViewComponents #Turbo #predicatemethod #turbo https://rubyonrails.ba/link/using-viewcomponents-with-turbo-predicatemethod