Package Exports
- adonisjs-livewire
- adonisjs-livewire/build/providers/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (adonisjs-livewire) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
AdonisJS Livewire (WIP)
A front-end framework for AdonisJS
Getting Started
This package is available in the npm registry.
npm install adonisjs-livewireNext, configure the package by running the following command.
node ace configure adonisjs-livewireConfiguration
Enable ALS in config/app.ts https://docs.adonisjs.com/guides/async-local-storage#usage
// config/app.ts
export const http: ServerConfig = {
useAsyncLocalStorage: true,
}now you can use this.ctx in your Livewire components.
Create a Livewire component
node ace make:livewire CounterUsage
// views/welcome.edge
<!DOCTYPE html>
<html lang="en">
<head>
@livewireStyles
</head>
<body>
@livewire('Counter')
@livewireScripts
</body>
</html>