Skip to content

Lazy registration of controllers#690

Open
AndersGM wants to merge 7 commits into
hotwired:mainfrom
AndersGM:register-lazy
Open

Lazy registration of controllers#690
AndersGM wants to merge 7 commits into
hotwired:mainfrom
AndersGM:register-lazy

Conversation

@AndersGM

@AndersGM AndersGM commented Jun 19, 2023

Copy link
Copy Markdown

As a follow up on the discussion on #687 I've given lazy registration of controllers a shot.

Sample usage (eg by stimulus-rails):

application.registerLazy('other-hello', () => {
  return import('./other_hello_controller').then((controller) => controller.default)
})

@AndersGM AndersGM marked this pull request as ready for review June 19, 2023 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant