From c492d48ecbee884d2c95cdeddbaf780ccefa6f6c Mon Sep 17 00:00:00 2001 From: Vladislav Stoitsov Date: Mon, 4 Apr 2022 12:49:20 +0300 Subject: [PATCH] Update README.md for alpine3 --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6ac795d..3fcf820 100644 --- a/README.md +++ b/README.md @@ -199,7 +199,11 @@ component('search', Search); import 'alpinejs'; ``` - +**For alpine3 use:** +```ts +import Alpine from 'alpinejs'; +Alpine.start() +``` **`app.ts` highlights:** @@ -376,3 +380,5 @@ export default class Search extends AlpineComponent { - We call the component in `x-data` - We use both the constructor and `init`. The constructor cannot access magic properties, `init` can. - We can still use Alpine syntax in the template with no issues + +