1
0
Fork 0
mirror of https://github.com/archtechx/alpine-typescript.git synced 2026-02-04 10:44:04 +00:00

Update README.md for alpine3

This commit is contained in:
Vladislav Stoitsov 2022-04-04 12:49:20 +03:00 committed by GitHub
parent 2c372c4063
commit c492d48ecb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -199,7 +199,11 @@ component('search', Search);
import 'alpinejs';
```
**For alpine3 use:**
```ts
import Alpine from 'alpinejs';
Alpine.start()
```
</details>
**`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