{"id":3475,"date":"2020-06-11T08:52:00","date_gmt":"2020-06-11T08:52:00","guid":{"rendered":"http:\/\/the-codest.localhost\/blog\/need-to-use-the-common-js-frameworks-in-your-rails-app\/"},"modified":"2026-04-24T11:38:32","modified_gmt":"2026-04-24T11:38:32","slug":"vaja-kasutada-oma-rails-rakenduses-uhiseid-js-raamistikke","status":"publish","type":"post","link":"https:\/\/thecodest.co\/et\/blog\/need-to-use-the-common-js-frameworks-in-your-rails-app\/","title":{"rendered":"Stimulus.js: JS Framework alternatiiv Rails rakenduste jaoks: JS Framework Alternative for Rails Apps"},"content":{"rendered":"\n<p>I know what you\u2019re thinking\u2026 Another <a href=\"https:\/\/thecodest.co\/et\/blog\/hire-javascript-developer\/\">JavaScript<\/a> framework? There are already so many of them! You\u2019re right, but this one caught my attention as it was created by <strong>Basecamp<\/strong>. You probably know this company, they are the creators of <strong><a href=\"https:\/\/thecodest.co\/et\/case-studies\/delivering-ruby-on-rails-talent-for-fast-integration\/\">Ruby on Rails<\/a><\/strong>. They also created <strong>Turbolinks,<\/strong> and I mention this because Stimulus pairs beautifully with it. So, maybe it\u2019s worth giving Stimulus a try?<\/p>\n\n\n\n<p><strong>How does it work?<\/strong><\/p>\n\n\n\n<p>Stimulus works by monitoring the page, waiting for the <code>data-controller<\/code> attribute to appear. The <code>data-controller<\/code> value connects and disconnects Stimulus controllers. The premise is simple: just as class is a connection between HTML and CSS, <code>data-controller<\/code> is a bridge from HTML to JavaScript. Stimulus also adds the <code>data-action<\/code> attribute, which describes how events on the page should trigger the controller methods, and the <code>data-target<\/code> attribute, which gives you a handle for finding elements in the controller\u2019s scope.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Easy installation<\/h2>\n\n\n\n<p>If your <a href=\"https:\/\/thecodest.co\/et\/blog\/ways-to-increase-your-rails-performance\/\">Rails<\/a> app is using a webpacker gem, you can install Stimulus with one simple command as the webpacker gem provides a task for installing Stimulus. Just run the following command in your Rails root directory:<\/p>\n\n\n\n<p><code>rails webpacker:install:stimulus<\/code><br>This adds Stimulus to <code>package.json<\/code> and creates the following two files: <code>app\/javascript\/controllers\/index.js:<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">import { Application } from \"stimulus\"\nimport { definitionsFromContext } from \"stimulus\/webpack-helpers\"\n\nconst application = Application.start()\nconst context = require.context(\"controllers\", true, \/_controller.js$\/)\napplication.load(definitionsFromContext(context))<\/code><\/pre>\n\n\n\n<p>You can see that the webpack\u2019s require.context helper is called. It then passed the resulting context to the Application#load method. This means that our application is looking for files named<code>[identifier]_controller.js<\/code> in the <code>app\/javascript\/controllers\/<\/code> directory, where the identifier corresponds with the controller\u2019s data-controller identifier in your HTML. This is exactly the place where we should put the Stimulus controllers.<br>The app<code>\/javascript\/controllers\/hello_controller.js<\/code> is also generated. This is just an example controller that we can play with.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Basic usage<\/h3>\n\n\n\n<p>Ok, so we have the <code>hello_controller.js<\/code> file created with the following <a href=\"https:\/\/thecodest.co\/et\/dictionary\/what-is-code-refactoring\/\">code<\/a>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\nstatic targets = [\"output\"]\nconnect() {\nthis.outputTarget.textContent = 'Hello, Stimulus!'\n}\n}<\/code><\/pre>\n\n\n\n<p>But, as you know, we won\u2019t see any effects if we don\u2019t make the connection between HTML and JavaScript. Let\u2019s add some code to your HTML view. You can put this whenever you want:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"markup\" class=\"language-markup\">&lt;div data-controller=\"hello\">\n&lt;p data-target=\"hello.output\">&amp;nbsp;&lt;\/p>\n&lt;\/div><\/code><\/pre>\n\n\n\n<p>And you know what? That\u2019s all! If you reload your page and see \u201cHello, Stimulus!\u201d on your page, this means that the connection is working properly. Simple, right?<br>Ok, but this is just a plain text display. Can we have some action? Yes, we can! As I mentioned before, there is also the <code>data-action<\/code> attribute. Let\u2019s then change our HTML view:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">&lt;div data-controller=\"hello\">\n&lt;p>&lt;input type=\"number\" data-target=\"hello.days\">&lt;br>&lt;button data-action=\"click->hello#calculate\">Calculate&lt;\/button>&lt;\/p>\n&lt;\/div><\/code><\/pre>\n\n\n\n<p>And the Stimulus controller <code>app\/javascript\/controllers\/hello_controller.js<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\nstatic targets = [\"output\", \"days\"]\nconnect() {\nthis.outputTarget.textContent = 'How long have you been in quarantine?'\n}\ncalculate() {\nconst element = this.daysTarget\nconst days = element.value\nconst lockdownDays = 14\nlet daysLeft = lockdownDays - days\n\nif (daysLeft &lt; 1) {\n  alert('You are free!')\n}\nelse {\n  alert(`Amount of days you need to stay on quarantine: ${daysLeft}`)\n}\n\n}\n}<\/code><\/pre>\n\n\n\n<p>Here we have a very simple app that calculates how long we must stay in quarantine. We managed to do this by using the data-action attribute in HTML.<br>You can see that we also added \u201cdays\u201d to the list of targets in the JavaScript code. When we do this, Stimulus automatically creates a <code>this.daysTarget<\/code> property which returns the first matching target element.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What else do you need to know?<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Callbacks<\/h3>\n\n\n\n<p>You probably noticed that there is a <code>connect()<\/code> method in both examples. This one is for built-in callbacks. You should know all of them and their lifecycle, so here they are:<br><code>initialize<\/code>: once, when the controller is first instantiated,<br><code>connect<\/code>: anytime the controller is connected to the DOM,<br><code>disconnect<\/code>: anytime the controller is disconnected from the DOM.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Action descriptor<\/h3>\n\n\n\n<p>The <code>data-action<\/code> value <code>click-&gt;hello#calculate<\/code> is called an action descriptor. This descriptor says that:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>click<\/code> is the event name,<\/li>\n\n\n\n<li><code>hello<\/code> is the controller identifier,<\/li>\n\n\n\n<li><code>calculate<\/code> is the name of the method.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Targets<\/h3>\n\n\n\n<p>Just like for actions, Stimulus has a target descriptor. The <code>hello.days<\/code> descriptor says that: <code>hello<\/code> is the controller identifier,<br><code>days<\/code> is the target name.<\/p>\n\n\n\n<p>In the previous example, I mentioned that Stimulus creates the <code>this.daysTarget<\/code> property when there is \u201cdays\u201d in the list of targets. You also need to know that more properties can be created. In relation to the example, you can have:<\/p>\n\n\n\n<p><code>this.daysTarget<\/code> which evaluates up to the first target in the controller\u2019s scope. If there is no target, the property flags an error,<br><code>this.daysTargets<\/code> evaluates up to an array of all source targets in the controller\u2019s scope,<br><code>this.hasDaysTarget<\/code> returns true if there is a target or false if not.<\/p>\n\n\n\n<p>As you can see, Stimulus is simple and can easily be added to your application. It\u2019s gaining some popularity in the <a href=\"https:\/\/thecodest.co\/et\/blog\/hire-ror-developer\/\">RoR<\/a> community and I\u2019m not surprised. As a <a href=\"https:\/\/thecodest.co\/et\/case-studies\/providing-a-team-of-ruby-developers-for-a-fintech-company\/\">Ruby<\/a> <a href=\"https:\/\/thecodest.co\/et\/blog\/hire-vue-js-developers\/\">developer<\/a> myself, I really enjoy working with Stimulus. So how about taking it for a spin?<\/p>\n\n\n\n<p><strong>Read more:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><a href=\"https:\/\/thecodest.co\/blog\/web-app-development-why-is-ruby-on-rails-a-technology-worth-choosing\/\">Web App Development: Why is Ruby on Rails a technology worth choosing?<\/a><\/strong><\/li>\n\n\n\n<li><strong><a href=\"https:\/\/thecodest.co\/blog\/an-era-of-remote-work-has-started-a-month-ago\/\">Time for a new reality. An era of remote work has started a month ago<\/a><\/strong><\/li>\n\n\n\n<li><strong><a href=\"https:\/\/thecodest.co\/blog\/5-reasons-why-you-will-find-qualified-ruby-developers-in-poland\/\">5 reasons why you will find qualified Ruby developers in Poland<\/a><\/strong><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Nagu selle loojad \u00fctlevad, on Stimulus tagasihoidlike ambitsioonidega JavaScript raamistik, mis ei p\u00fc\u00fca \u00fcle v\u00f5tta kogu teie frontendist, vaid t\u00e4iendada HTML-i just nii palju k\u00e4itumist, et see s\u00e4rada.<\/p>","protected":false},"author":2,"featured_media":3476,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-3475","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-development"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Stimulus.js: A JS Framework Alternative for Rails Apps - The Codest<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/thecodest.co\/et\/blogi\/vaja-kasutada-oma-rails-rakenduses-uhiseid-js-raamistikke\/\" \/>\n<meta property=\"og:locale\" content=\"et_EE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Stimulus.js: A JS Framework Alternative for Rails Apps\" \/>\n<meta property=\"og:description\" content=\"As its creators say, Stimulus is a JavaScript framework with modest ambitions, which doesn\u2019t seek to overtake your entire frontend but to augment HTML with just enough behavior to make it shine.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/thecodest.co\/et\/blogi\/vaja-kasutada-oma-rails-rakenduses-uhiseid-js-raamistikke\/\" \/>\n<meta property=\"og:site_name\" content=\"The Codest\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-11T08:52:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-24T11:38:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/cover-image-128.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"thecodest\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"thecodest\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutit\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/need-to-use-the-common-js-frameworks-in-your-rails-app\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/need-to-use-the-common-js-frameworks-in-your-rails-app\\\/\"},\"author\":{\"name\":\"thecodest\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/person\\\/7e3fe41dfa4f4e41a7baad4c6e0d4f76\"},\"headline\":\"Stimulus.js: A JS Framework Alternative for Rails Apps\",\"datePublished\":\"2020-06-11T08:52:00+00:00\",\"dateModified\":\"2026-04-24T11:38:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/need-to-use-the-common-js-frameworks-in-your-rails-app\\\/\"},\"wordCount\":739,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/need-to-use-the-common-js-frameworks-in-your-rails-app\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/cover-image-128.jpg\",\"articleSection\":[\"Software Development\"],\"inLanguage\":\"et\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/thecodest.co\\\/blog\\\/need-to-use-the-common-js-frameworks-in-your-rails-app\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/need-to-use-the-common-js-frameworks-in-your-rails-app\\\/\",\"url\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/need-to-use-the-common-js-frameworks-in-your-rails-app\\\/\",\"name\":\"Stimulus.js: A JS Framework Alternative for Rails Apps - The Codest\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/need-to-use-the-common-js-frameworks-in-your-rails-app\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/need-to-use-the-common-js-frameworks-in-your-rails-app\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/cover-image-128.jpg\",\"datePublished\":\"2020-06-11T08:52:00+00:00\",\"dateModified\":\"2026-04-24T11:38:32+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/need-to-use-the-common-js-frameworks-in-your-rails-app\\\/#breadcrumb\"},\"inLanguage\":\"et\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/thecodest.co\\\/blog\\\/need-to-use-the-common-js-frameworks-in-your-rails-app\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"et\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/need-to-use-the-common-js-frameworks-in-your-rails-app\\\/#primaryimage\",\"url\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/cover-image-128.jpg\",\"contentUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/cover-image-128.jpg\",\"width\":1200,\"height\":600},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/need-to-use-the-common-js-frameworks-in-your-rails-app\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/thecodest.co\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Stimulus.js: A JS Framework Alternative for Rails Apps\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#website\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"name\":\"The Codest\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/thecodest.co\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"et\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\",\"name\":\"The Codest\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"et\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/03\\\/thecodest-logo.svg\",\"contentUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/03\\\/thecodest-logo.svg\",\"width\":144,\"height\":36,\"caption\":\"The Codest\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/pl.linkedin.com\\\/company\\\/codest\",\"https:\\\/\\\/clutch.co\\\/profile\\\/codest\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/person\\\/7e3fe41dfa4f4e41a7baad4c6e0d4f76\",\"name\":\"thecodest\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"et\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"caption\":\"thecodest\"},\"url\":\"https:\\\/\\\/thecodest.co\\\/et\\\/author\\\/thecodest\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Stimulus.js: JS Framework alternatiiv Rails rakenduste jaoks - The Codest","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/thecodest.co\/et\/blogi\/vaja-kasutada-oma-rails-rakenduses-uhiseid-js-raamistikke\/","og_locale":"et_EE","og_type":"article","og_title":"Stimulus.js: A JS Framework Alternative for Rails Apps","og_description":"As its creators say, Stimulus is a JavaScript framework with modest ambitions, which doesn\u2019t seek to overtake your entire frontend but to augment HTML with just enough behavior to make it shine.","og_url":"https:\/\/thecodest.co\/et\/blogi\/vaja-kasutada-oma-rails-rakenduses-uhiseid-js-raamistikke\/","og_site_name":"The Codest","article_published_time":"2020-06-11T08:52:00+00:00","article_modified_time":"2026-04-24T11:38:32+00:00","og_image":[{"width":1200,"height":600,"url":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/cover-image-128.jpg","type":"image\/jpeg"}],"author":"thecodest","twitter_card":"summary_large_image","twitter_misc":{"Written by":"thecodest","Est. reading time":"4 minutit"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/thecodest.co\/blog\/need-to-use-the-common-js-frameworks-in-your-rails-app\/#article","isPartOf":{"@id":"https:\/\/thecodest.co\/blog\/need-to-use-the-common-js-frameworks-in-your-rails-app\/"},"author":{"name":"thecodest","@id":"https:\/\/thecodest.co\/#\/schema\/person\/7e3fe41dfa4f4e41a7baad4c6e0d4f76"},"headline":"Stimulus.js: A JS Framework Alternative for Rails Apps","datePublished":"2020-06-11T08:52:00+00:00","dateModified":"2026-04-24T11:38:32+00:00","mainEntityOfPage":{"@id":"https:\/\/thecodest.co\/blog\/need-to-use-the-common-js-frameworks-in-your-rails-app\/"},"wordCount":739,"commentCount":0,"publisher":{"@id":"https:\/\/thecodest.co\/#organization"},"image":{"@id":"https:\/\/thecodest.co\/blog\/need-to-use-the-common-js-frameworks-in-your-rails-app\/#primaryimage"},"thumbnailUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/cover-image-128.jpg","articleSection":["Software Development"],"inLanguage":"et","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/thecodest.co\/blog\/need-to-use-the-common-js-frameworks-in-your-rails-app\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/thecodest.co\/blog\/need-to-use-the-common-js-frameworks-in-your-rails-app\/","url":"https:\/\/thecodest.co\/blog\/need-to-use-the-common-js-frameworks-in-your-rails-app\/","name":"Stimulus.js: JS Framework alternatiiv Rails rakenduste jaoks - The Codest","isPartOf":{"@id":"https:\/\/thecodest.co\/#website"},"primaryImageOfPage":{"@id":"https:\/\/thecodest.co\/blog\/need-to-use-the-common-js-frameworks-in-your-rails-app\/#primaryimage"},"image":{"@id":"https:\/\/thecodest.co\/blog\/need-to-use-the-common-js-frameworks-in-your-rails-app\/#primaryimage"},"thumbnailUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/cover-image-128.jpg","datePublished":"2020-06-11T08:52:00+00:00","dateModified":"2026-04-24T11:38:32+00:00","breadcrumb":{"@id":"https:\/\/thecodest.co\/blog\/need-to-use-the-common-js-frameworks-in-your-rails-app\/#breadcrumb"},"inLanguage":"et","potentialAction":[{"@type":"ReadAction","target":["https:\/\/thecodest.co\/blog\/need-to-use-the-common-js-frameworks-in-your-rails-app\/"]}]},{"@type":"ImageObject","inLanguage":"et","@id":"https:\/\/thecodest.co\/blog\/need-to-use-the-common-js-frameworks-in-your-rails-app\/#primaryimage","url":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/cover-image-128.jpg","contentUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/cover-image-128.jpg","width":1200,"height":600},{"@type":"BreadcrumbList","@id":"https:\/\/thecodest.co\/blog\/need-to-use-the-common-js-frameworks-in-your-rails-app\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/thecodest.co\/"},{"@type":"ListItem","position":2,"name":"Stimulus.js: A JS Framework Alternative for Rails Apps"}]},{"@type":"WebSite","@id":"https:\/\/thecodest.co\/#website","url":"https:\/\/thecodest.co\/","name":"The Codest","description":"","publisher":{"@id":"https:\/\/thecodest.co\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/thecodest.co\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"et"},{"@type":"Organization","@id":"https:\/\/thecodest.co\/#organization","name":"The Codest","url":"https:\/\/thecodest.co\/","logo":{"@type":"ImageObject","inLanguage":"et","@id":"https:\/\/thecodest.co\/#\/schema\/logo\/image\/","url":"https:\/\/thecodest.co\/app\/uploads\/2024\/03\/thecodest-logo.svg","contentUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/03\/thecodest-logo.svg","width":144,"height":36,"caption":"The Codest"},"image":{"@id":"https:\/\/thecodest.co\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/pl.linkedin.com\/company\/codest","https:\/\/clutch.co\/profile\/codest"]},{"@type":"Person","@id":"https:\/\/thecodest.co\/#\/schema\/person\/7e3fe41dfa4f4e41a7baad4c6e0d4f76","name":"thecodest","image":{"@type":"ImageObject","inLanguage":"et","@id":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","caption":"thecodest"},"url":"https:\/\/thecodest.co\/et\/author\/thecodest\/"}]}},"_links":{"self":[{"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/posts\/3475","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/comments?post=3475"}],"version-history":[{"count":5,"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/posts\/3475\/revisions"}],"predecessor-version":[{"id":8370,"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/posts\/3475\/revisions\/8370"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/media\/3476"}],"wp:attachment":[{"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/media?parent=3475"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/categories?post=3475"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/tags?post=3475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}