component-playground
component-playground copied to clipboard
onUpdate prop can be passed to Playground.
New feature: onUpdate prop which gets called after each code update with the new code and an error object if one was caught during preview eval.
Useful for the ComponentPlayground in Spectacle where you may want to develop a piece of code across multiple slides in a presentation. onUpdate lets you hold onto code that was edited in one slide and insert it into a later slide (and optionally avoid holding onto code that generated an error).
Hm I just realized this isn't even the library used in Spectacle, but whatever, you can still merge this if you want. :slightly_smiling_face: