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

how to set code in LiveEditor that isn't used?

Open ghost opened this issue 3 years ago • 2 comments

code: `class MarkdownEditor extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);      

image

Yes. I'm re-creating reactjs.org website. its been a real joy so-far :)

ghost avatar Sep 12 '22 19:09 ghost

ah found one way. edit the theme with plain: {tabSize: '12px' } , neat :)

stephyswe avatar Sep 12 '22 19:09 stephyswe

is it possible to add code that doesn't run in live editor? example:

import styled from 'styled-components'
const Header = () => {
return <div>text</div>
}

and only run the const code, and not the import line.

stephyswe avatar Sep 12 '22 19:09 stephyswe