PlexusJS/plexus

Make a plugin that extends the output classes and the inner options

Pckool opened this issue · 0 comments

An example of this would be an extension plugin for state that allows you to have new options under state when you bass it a boolean (ex. toggle)

// ...
const value = state(false)

// we should make a plugin that can extend state when it detects a boolean type

value.toggle() // this is not a method on StateInstance, but we could extend it so it could be when we recognze a boolean