How to render complex components in Playground
See original GitHub issueQuestion
Hello,
I would like to pass some variables to my components and use it inside <Playground>
element as in the sample from
https://github.com/pedronauck/docz/blob/master/examples/basic/src/components/Alert.mdx#L37
So in my case I have:
<Playground>
{() => {
const subprojects = []
return <Project label="SomeLabel" projects="{subprojects}" />
}}
</Playground>
But this just renders as:
These are my devDepedencies:
"docz": "^0.5.8",
"docz-plugin-css": "^0.5.7",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
"react-test-renderer": "^16.4.1",
"typescript": "^2.9.2"
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Bit has a playground to render your component | by Dotekitoo D ...
Bit has a playground to render your component ... The more complex your application, the harder it will be to refactor and switch...
Read more >Advanced Playground Rendering Tools - GameTime
GameTime utilizes advanced rendering and animation software to provide a digital view of your new playground, Challenge Course or fitness park.
Read more >11 React UI Component Playgrounds for 2019 - Bits and Pieces
Top component playgrounds to render, view and develop React UI components online. Hot reload, simple configurations and much more.
Read more >component-playground: A component for rendering React ... - Reddit
component -playground: A component for rendering React components with editable source and live preview. r/reactjs - component-playground: A component for ...
Read more >Built-in components - Docz
With the <Playground> component, you can render your component inside a live-editable ... documentation for your component can be difficult and error-prone, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@angel-git This is a bug in your JSX:
then
""
around{someVar}
makes it get passed in as a string, rather than the value.ahhh how retarded I’m! thanks!