Hi,
I've observed this strange behaviour and I couldn't find information about that in documentation. Stimulus does connect, disconnect and connect again page user is redirected to - depends on what was method used in previous request.
Test scenario
- Have controller's action that responds with redirect to new page (the one with Stimulus controller).
- Bind this action to GET request - observe in console that Stimulus will connect, disconnect and connect again.
- Now change this action to POST - observe that Stimulus will only connect once.
This is in Rails 7 application with Turbo framework. However, I've opted-out of caching there.
You can find application that demonstrates this behaviour here: https://github.com/rience/stimulus-double-bind
Thank you in advance for help.