This is just a small file to remind myself how atrributes and props are ordered.
this
fromsvelte:element
bind:this
use
actions- id
- class
- element attributes
- aria attributes
- data attributes
- event handlers
- restProps
These are some naming conventions when it comes to the main.svelte.ts
files found the the src/lib/components
.
- Class context props are prefixed with a
$
to make it clear that it has a getter.- Example:
this.$value.val
- Example:
- Parent variables starts with an underscore (
_
).- Example:
this._root.variable
- Example:
- Derived statments start with a capital.
- Example:
this.DerivedState
- Example:
- Events passed down through the context are private to that class.
- Example:
this.#events.onClick?.(e)
- Example: