---
title: "Comment by Benjamin Bock on \"Alpine.js for Ruby on Rails Developers: Simplifying Frontend Development\" | Hashnode"
description: "I used Rails+Turbo+Alpine in two projects and agree with you. However, especially with Turbo morph, I often need to manually re-run effects after a page is refr"
url: "https://hashnode.com/posts/alpinejs-for-ruby-on-rails-developers-simplifying-frontend-development/66bdce2a4c00bb8e47b20640/comment/66c997f40d4abd147713f5f7"
---

[Discussion](https://hashnode.com/posts/alpinejs-for-ruby-on-rails-developers-simplifying-frontend-development/66bdce2a4c00bb8e47b20640)

Comment [Alpine.js for Ruby on Rails Developers: Simplifying Frontend Development](https://hashnode.com/posts/alpinejs-for-ruby-on-rails-developers-simplifying-frontend-development/66bdce2a4c00bb8e47b20640)

[Benjamin Bock](https://hashnode.com/@bnjmn)

[Aug 24, 2024](https://hashnode.com/posts/alpinejs-for-ruby-on-rails-developers-simplifying-frontend-development/66bdce2a4c00bb8e47b20640/comment/66c997f40d4abd147713f5f7)

I used Rails+Turbo+Alpine in two projects and agree with you.

However, especially with Turbo morph, I often need to manually re-run effects after a page is refreshed using morphing. What’s your general approach to this?

[Alex Sinelnikov](https://hashnode.com/@avdept)

[Aug 26, 2024](https://hashnode.com/posts/alpinejs-for-ruby-on-rails-developers-simplifying-frontend-development/66bdce2a4c00bb8e47b20640/comment/66c997f40d4abd147713f5f7#reply-66cc319dc1292c1d2630eddc)

You can keep your frontend state in the form input. It can be simple hidden input with json data inside it. And when you do request, you can use value of the input to restore/modify state of your block.
