Stimulus Reflex Lifecycle events

261 views Asked by At

This gist is an app which use Stimulus Reflex. It's about a pagination reflex, the thing is I need to hide is the spinner when afterReflex() callback is executed, but sometimes it doesn't work.

https://gist.github.com/matedemorphy/94c6ad13b6aebd89862b5b14120c98df

I have this line in config/initializers/session_store.rb

Rails.application.config.session_store :cookie_store, key: _my_app, domain: lvh.me, but then in development.rb

config.session_store :cache_store config.cache_store = :file_store, Rails.root.join(tmp, cache).to_s, { size: 320.megabytes }

it could some conflict there?

1

There are 1 answers

0
Joseph Palmezano On

In official docs: If you have multiple identical elements calling Reflex actions, no lifecycle mechanisms (afterReflex callbacks, success events etc) will be run. So i solved adding data-id