# Stimulus cheatsheet - Website: https://stimulusjs.org/ - GitHub repo: https://github.com/stimulusjs/stimulus - Handbook: https://stimulusjs.org/handbook/introduction - Discourse: https://discourse.stimulusjs.org/ ## Lifecycle callbacks - `initialize`: once, when the controller is first instantiated - `connect`: anytime the controller is connected to the DOM - `disconnect`: anytime the controller is disconnected from the DOM ## Action descriptors The data-action value `click->hello#greet` is called an action descriptor. This particular descriptor says: - `click` is the event name - `hello` is the controller identifier - `greet` is the name of the method to invoke ### Common Events Have a Shorthand Action Notation Stimulus defines click as the default event for actions on ` ```