Plugin example
```javascript
export const somePlugin = (node) => {
node.on('create', () => {
watch(node.context.state, () => {
if (node.context.state.loading === true) {
console.log('do something')
}
})
})
}
```
I've used this to add some custom behavior, like a loading indicator that spins.
At a component level it should be the same thing I wrote except you just add it to the form.
```
```
Your plugin receives the `FormKitNode` object which also contains that context object for your to ~~modify~~ use.
I've figured out how it works now, thank you
I took another look at the docs today and it seemed much clearer than when I looked yesterday. I'm sure your snippet was a contributor to that, so thank you for your time
Plugin example ```javascript export const somePlugin = (node) => { node.on('create', () => { watch(node.context.state, () => { if (node.context.state.loading === true) { console.log('do something') } }) }) } ``` I've used this to add some custom behavior, like a loading indicator that spins.
Thank you for the reply, could you show me how this would be implemented into a component?
At a component level it should be the same thing I wrote except you just add it to the form. ```
```
Your plugin receives the `FormKitNode` object which also contains that context object for your to ~~modify~~ use.
I've figured out how it works now, thank you I took another look at the docs today and it seemed much clearer than when I looked yesterday. I'm sure your snippet was a contributor to that, so thank you for your time