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.

Components withs external props are not rendered

See original GitHub issue

I have a component with a prop from an external file, for example:

import { size } from './props';

export default {
  props: {
    name: String,
    size,
  },
};

If I remove the prop sizeor simply declare it normally (like name), it works.

The component it is not rendered even if I declare in the same file like this:

const size = {
  type: String,
  default: 'medium',
};

export default {
  props: {
    name: String,
    size,
  },
};

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
elevatebartcommented, Feb 25, 2019

@fsblemos, I made a quick PR to make sure those properties are detected. At least this way they can be documented.

1reaction
elevatebartcommented, Jan 9, 2019

Hello @fsblemos, Happy New Year,

I thought about your issue. The only 2 kind of dependencies that vue styleguidist parses are mixins and extends. We can’t parse all the dependencies of each component for performance and security reasons.

I think what you are trying to build is a mixin. This would allow you to build documentation for the logical mixin itself on one end (with the pops that you need) and call it logically in your component.

I do not think we intend to make this specific use case work.

I hope it helps, Thank you again

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is my component is not rendering when I pass it props ...
When I try to pass the begin prop Front doesn't render for some reason. If I don't pass it any props then it...
Read more >
How passing props to component works in React
Master how to pass props (properties) to components in React with this useful beginner's guide, including demo code.
Read more >
Props change does not re render · Issue #17 - GitHub
As far as I know changing props doesn't cause a component to re render. Props change will trigger componentWillReceiveProps and will only cause...
Read more >
Why React Child Components Don't Update on Prop Changes
In React, it's a common problem to have child components that don't re- render when you expect them to. In particular, a common...
Read more >
Composition - Material UI - MUI
For example, by default a List component will render a <ul> element. This can be changed by passing a React component to the...
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