The order of callbacks in a stimulus controller can be easy to trip up on, especially when integrating some other JS library which you initialize once everything is connected. The order is:
- target connected
connect(){...}
- outlet connected
So if you are using an outlet with your other library, you'll likely want to initialize it within the outlet connected callback.
Top comments (0)