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.

PropsTable does not render

See original GitHub issue

Bug Report

PropsTable did not render anything in the screen. (cc #138) I’m using TypeScript.

To Reproduce

---
name: Button
---

import { PropsTable } from 'docz'

import Button from './Button'

# Button

<Button onPress={() => alert('pressed')}>Click</Button>

<PropsTable of={Button} />
import React from 'react'
import { StyleSheet, Text, Touchable } from 'react-primitives'

const styles = StyleSheet.create({
  text: {
    color: 'green',
  },
})

export interface ButtonProps {
  test?: string
  children: string
}

const Button: React.SFC<ButtonProps> = props => (
  <Touchable {...props}>
    <Text style={styles.text}>{props.children}</Text>
  </Touchable>
)

export default Button

Expected behavior

Render PropsTable, getting props from TypeScript interface automatically

Environment

  • OS: macOS 10.14
  • Node/npm version: Node 8/npm 5

Additional context/Screenshots

image

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:22 (3 by maintainers)

github_iconTop GitHub Comments

9reactions
mraccommented, Aug 15, 2018

I had the same issue. The problem was import line for ‘react’. import * as React from 'react' helped.

2reactions
markusoelhafencommented, Aug 27, 2018

@JeroenReumkens Gave it a quick try, but didn’t work with import { default as ComponentName } from './Component'. Maybe this issue somehow relates to this issue at react-docgen-typescript?

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Best Practices: Where to *not* render a component?
I've got a Hyperlink component with a url prop. If for some reason url is falsy, Hyperlink renders null . simplified example: const...
Read more >
ArgsTable - Storybook - JS.ORG
This would render a row with a modified description, a type display with a dropdown that shows the detail, and no control.
Read more >
react-props-table - npm
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF...
Read more >
Creating and Maintaining an Organized Props Area - Theatrefolk
But the dismantled props table won't take up much space during non-show hours. 2. Remind all students that the props area is for...
Read more >
Manual:Page props table - MediaWiki
Note that reparsing a page causes all of its properties to be purged from this table and replaced with the new ones, so...
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