repl icon indicating copy to clipboard operation
repl copied to clipboard

Embedding ramda/repl

Open chasm opened this issue 8 years ago • 2 comments

I am working on a small React/Redux Next.js app to teach FP and React in an FP style (using Ramda). It would be very helpful to be able to embed the Ramda REPL into the app pages similarly to the way it is embedded in the Ramda documentation.

Is this permitted? If so, are there examples? The instructions here are great but inject directly into the DOM. This is complicated when working with a virtual DOM implementation such as that in React. It would be nice to have a reusable React component that provided REPL functionality and could be used multiple times on a page. If I wrote such a component, I'd be happy to share it via npm/GitHub. Or maybe one already exists?

Any help greatly appreciated.

chasm avatar Oct 26 '17 20:10 chasm

I for one have no objections at all. I think it would be a great thing!

If you're looking for a REPL that could be embedded multiple times in a page, you might consider RunKit. This is how Ramda inlines its runnable examples; the stand-alone REPL is an entirely different codebase. I don't know anything about a React component, though. (You might ping @tolmasky about that.)

CrossEye avatar Oct 26 '17 20:10 CrossEye

Oh, joy! There is a react-runkit. I am indebted to you, sir.

chasm avatar Oct 26 '17 22:10 chasm