question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crashes when using Playground Component - docz v0.13.7

See original GitHub issue

Bug Report

Crashes when using the Playground component

To Reproduce

Just wrapping my components in

🚨 Whoops, we crashed 🚨
Passed an incorrect argument to a color function, please pass a string representation of a color.
Stack trace
in Styled(div) (created by right)
in right (created by Resizable)
in div (created by Resizer)
in Resizer (created by Resizable)
in span (created by Resizable)
in div (created by Resizable)
in Resizable (created by RenderBase)
in div (created by Context.Consumer)
in Styled(div) (created by RenderBase)
in div (created by LiveProvider)
in LiveProvider (created by RenderBase)
in RenderBase (created by Context.Consumer)
in ThemeConfig (created by Render)
in Render (created by BasePlayground)
in BasePlayground (created by Context.Consumer)
in Component (at text.mdx:19)
in div (created by MDXTag)
in MDXTag (created by Context.Consumer)
in Component (at text.mdx:14)
in MDXContent (created by AsyncComponent)

My mdx code:

---
name: Button
---

import { Playground } from 'docz'
import { Button } from './button'

# Button

## Basic usage

<Playground>
  <Button
    label='Click me'
  />
</Playground>

More Information: I already see this issue: https://github.com/pedronauck/docz/issues/540 And I already install the docz-theme-default and still crash

EDIT: I did this example app to simulate the problem, take a look: https://github.com/rodrigowpl/rn-docz-play

Expected behavior

Render without crashing

Environment

  • OS: OSX 10.14.2
  • Node/npm version: [e.g. Node 8/npm 6]
  • react-native 0.57.8
  • react 16.6.3
  • styled-components 4.1.3
  • docz 0.13.7

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:14
  • Comments:6

github_iconTop GitHub Comments

4reactions
joshungercommented, Jan 27, 2019

This works for me -

  "devDependencies": {
    "@emotion/core": "^10.0.6",
    "docz": "^0.13.7",
    "docz-theme-default": "^0.13.7",
    "emotion-theming": "^10.0.6",
  },
0reactions
lintucommented, Feb 21, 2019

thrown from node_modules/polished/lib/color/parseToRgb.js

Read more comments on GitHub >

github_iconTop Results From Across the Web

Built-in components - Docz
With the <Playground> component, you can render your component inside a live-editable playground and directly see the output of the code used:
Read more >
Playgrounds crashes all the time, … | Apple Developer Forums
IPad Playgrounds has started to routinely crash on me. It started crashing while I was trying to work with protocol meta types, so...
Read more >
rouch/Cypress: Fast, easy and reliable testing for anything that runs ...
Cypress - Fast, easy and reliable testing for anything that runs in a browser.
Read more >
SAP/fundamental-ngx | Coveralls - Test Coverage History & Statistics
Test code coverage history for SAP/fundamental-ngx.
Read more >
Iowa Administrative Code Supplement
by coordination or qualification shall substantially comply, as determined by the administrator, with the NASAA Guidelines for Equipment Programs as adopted ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found