Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Export
StimulusReflexController
constant (#672)
## Description This pull request exports the `StimulusReflexController` constant so it can be imported from the `stimulus_reflex` package. ## Why should this be added We already allow developers to customize the default controller used for the `stimulus-reflex` identifier by passing in the `controller` option in the `StimulusReflex.initialize(application, options)` call. This pull requests now allows developers to base their default controller off the StimulusReflex controller by inheriting from the `StimulusReflexController` constant, like: ```js // controllers/default_controller.js import { StimulusReflexController } from "stimulus_reflex" export default class extends StimulusReflexController { // extend the `stimulus-reflex` controller } ``` and: ```js import DefaultController from "../controllers/default_controller" StimulusReflex.initialize(application, { controller: DefaultController }) ```
- Loading branch information