Update README.md

This commit is contained in:
Nicco 2020-11-16 16:29:01 +01:00 committed by GitHub
parent 1e987f84b9
commit 1e14e44a64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,7 +47,21 @@ yarn add svelte-cloudinary
This will formulate the Cloudinary url and insert it into the `img.src` property.
Also it will resize to the `img` object itself because we set `bind: true`.
## Key Concepts
## 🤔 Why an [action](https://svelte.dev/docs#use_action) and not component?
Well components are great of course, but when we only need to set a `src` tags we can leverage the upsides of a svelte [action](https://svelte.dev/docs#use_action)
What are benefits?
- Native styling (Svelte for now does not allow easy styling of child components
- Lightweight
- Reusable and composable
Downsides:
- The src will not be set serverside, so also not in the initial server response. Which I believe is not that bad though for images.
## 🤓 Key Concepts
### `step`