Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TurboPower should work with @hotwired/turbo and @hotwired/turbo-rails #5

Open
marcoroth opened this issue Oct 19, 2022 · 0 comments
Open

Comments

@marcoroth
Copy link
Owner

marcoroth commented Oct 19, 2022

It shouldn't matter if you are using @hotwired/turbo or @hotwired/turbo-rails, TurboPower should work either way.

As pointed out in #2 and #3 (comment) it seems like there are some inconsistencies. The following snippets should work:

import * as Turbo from "@hotwired/turbo"
import TurboPower from "turbo_power"

TurboPower.initialize(Turbo.StreamActions)
import { StreamActions } from "@hotwired/turbo"
import TurboPower from "turbo_power"

TurboPower.initialize(StreamActions)
import { Turbo } from "@hotwired/turbo-rails"
import TurboPower from "turbo_power"

TurboPower.initialize(Turbo.StreamActions)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant