react-live icon indicating copy to clipboard operation
react-live copied to clipboard

Request/Question: Do we have a global scope functionality?

Open lucantini opened this issue 7 years ago • 2 comments

Hi! In my use case it would interesting to have a global scope where I can add all of my components!

I'm using your library in conjunction with react-docgen to create a live version of my components documentation with live previews and an editor. The only problem that I'm having is with the scope prop. Is it possible to have a single provider on top of the other that has the scope of all of my components? I can help you guys with that if need be!

You guys did an amazing job!

lucantini avatar Aug 23 '18 16:08 lucantini

That’s a very interesting idea! I was also playing with the idea of somehow evaluating some things into a global “continuous scope” so that we can support REPL-like features and combine all components across multiple live environments.

This is probably something we can discuss and address after the API refactor? cc @sofiapoh

kitten avatar Aug 24 '18 09:08 kitten

Hey @lucantini, that does sound like an interesting piece of functionality for sure! I'm currently working on the next version of react-live so when the API solidifies a bit we could get back to this. Thanks for the suggestion! :)

sofiapoh avatar Aug 24 '18 21:08 sofiapoh