Install and initialize TurboPower
mainTo use turbo_power as a power-pack for Turbo Streams, install it via yarn and initialize it by passing the Turbo Stream Actions to TurboPower.initialize.
Note: This requires Turbo 7.2+.
TypeScript users: turbo_power re-exports types from @hotwired/turbo. Since Turbo 8, these types are provided via @types/hotwired__turbo. You must install this package manually for type support.
yarn add turbo_power
# For TypeScript users:
yarn add --dev @types/hotwired__turbo// application.js
import * as Turbo from '@hotwired/turbo'
import TurboPower from 'turbo_power'
TurboPower.initialize(Turbo.StreamActions)