Stimulus: [FAQ] Page-Specific Javascript

Created on 9 Jan 2018  路  2Comments  路  Source: hotwired/stimulus

Hi,

Sorry, I didn't find any forum to post this question.

May I know, can we achieve "Page-Specific Javascript" loading as mentioned in Organizing Javascript in Rails Application With Turbolinks article using this framework ?

Thanks.

Most helpful comment

@kirantpatil when you load the page stimulus only boots up new instances of controllers that you specified on the page. It uses MutationObservers under the hood.
So it should be "Page-Specific" out of the box :)

All 2 comments

@kirantpatil when you load the page stimulus only boots up new instances of controllers that you specified on the page. It uses MutationObservers under the hood.
So it should be "Page-Specific" out of the box :)

What @dixpac said 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

incompletude picture incompletude  路  3Comments

ngan picture ngan  路  3Comments

jaredcwhite picture jaredcwhite  路  3Comments

dwightwatson picture dwightwatson  路  3Comments

paulozoom picture paulozoom  路  4Comments