chore: Port FreeSewing.dev to docusaurus
The replaces the NextJS site powering FreeSewing.dev with a Docusaurus setup. It's part of my efforts to simplify FreeSewing's setup so we can focus on our core value proposition.
This commit is contained in:
parent
497633d1d3
commit
ab3204f9f1
692 changed files with 11037 additions and 20674 deletions
45
sites/dev/docs/reference/api/store/set/readme.mdx
Normal file
45
sites/dev/docs/reference/api/store/set/readme.mdx
Normal file
|
@ -0,0 +1,45 @@
|
|||
---
|
||||
title: Store.set()
|
||||
---
|
||||
|
||||
The `Store.set()` method stores the value of `value` in the store under key
|
||||
`key`.
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
Store store.set(mixed key, mixed value)
|
||||
```
|
||||
|
||||
:::tipThis method is chainable as it returns the `Store` object:::
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
const store = new Store()
|
||||
store.set('example', 'Hi there')
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
You can get/set nested keys either through dot-notation, or by passing an
|
||||
array:
|
||||
|
||||
```js
|
||||
const store = new Store()
|
||||
|
||||
store.set('my.nested.example', 'Hi there')
|
||||
store.set(['my', 'other', 'nested', 'example'], 'Oh hi again')
|
||||
|
||||
let value
|
||||
// Dot notation
|
||||
value = store.get('my.nested.example') // works
|
||||
value = store.get('my.other.nested.example') // works
|
||||
// Using an array
|
||||
value = store.get(['my', 'nested', 'example']) // works
|
||||
value = store.get(['my', 'other', 'nested', 'example']) // works
|
||||
// Direct access to the store object
|
||||
value = store.my.nested.example // Also works
|
||||
value = store.my.other.nested.example // Also works
|
||||
```
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue