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.

2.0.0 missing displayName from all components in the new build and defaultProps boolean noise

See original GitHub issue

Hey

Just upgraded from 1.5.0 to 2.0.0 and noticed all snapshots are now very very different to what they were before.

eg minified name for Columns is v, Card is p etc:

    -       <Columns
    +       <v
    +         backgroundColor={null}
    -       <Card
    +       <p
    +         backgroundColor={null}

this is probably because of webpack 4 optimisation minimise settings for prod where UglifyJS is just being called with defaults. https://webpack.js.org/configuration/optimization/#optimization-minimize

additionally, there seem to be a lot of new defaultProps across the board. eg Card:

    +         clearfix={false}
    +         clipped={false}
    +         hidden={false}
    +         invisible={false}
    +         italic={false}
    +         marginless={false}
    +         overlay={false}
    +         paddingless={false}
    +         radiusless={false}

this is coming from https://github.com/couds/react-bulma-components/blob/master/src/modifiers/index.js#L16

 defaultProps: {
    clearfix: false,
    pull: undefined,
    marginless: false,
    paddingless: false,
    overlay: false,
    clipped: false,
    radiusless: false,
    shadowless: false,
    unselectable: false,
    invisible: false,
    hidden: false,
  },

there is NO need to add any default props of type Boolean with a falsy value, simply omitting it has the same result in 99% of the cases w/o the noise.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
coudscommented, Oct 8, 2019

Released v3.1.3 🎉

0reactions
DimitarChristoffcommented, Oct 8, 2019

it looks like this stopped breaking the build. 👍 cheers!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Next.JS build Error: Component definition is missing display ...
JS application that was deployed on Vercel. At first, I encountered no issues, however, lately, the application will fail to deploy because my ......
Read more >
"Missing React element for debugID" warning when testing ...
The OP error has disappeared for me using the latest build. All reactions.
Read more >
React: Everything about Default Props | by Chidume Nnamdi
In this post, we'll learn all about default props in React. ... Well, components are the main tools we use to build an...
Read more >
@react-native-community/eslint-config | Yarn - Yarn
CI moved to Node 16. (f1488db109 by @kelset). This change enforces Node >= 14 for React Native builds. Bump Android Gradle Plugin to...
Read more >
material-ui/core/CHANGELOG.md - UNPKG
This is a reminder that all ongoing work has moved to v5. This means a feature freeze on v4. The development of v4...
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