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.

Doesn't break long React props

See original GitHub issue

e.g.

<BaseForm url="/auth/google" method="GET" colour="blue" size="large" submitLabel="Sign in with Google" />

should probably be converted into

<BaseForm 
  url="/auth/google"
  method="GET"
  colour="blue"
  size="large"
  submitLabel="Sign in with Google"
/>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:9
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
gaearoncommented, Jan 10, 2017

Here, IMO the best style would be the one that optimizes for diff readability on changes. Like the one in the OP post. Probably worth doing for any elements that don’t fit within a single line completely.

0reactions
vramanacommented, Jan 11, 2017

I am closing this in favour of #73. Please continue the discussion in that thread.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Props Cheatsheet: 10 Patterns You Should Know
1. React props can be passed conditionally. Props that are passed to components can be thought of like arguments that are passed to...
Read more >
How can I insert a line break into a <Text> component in ...
This answer suggests adding styled-components but it's actually the template literal that provides the break, therefore styled-components does not participate ...
Read more >
Option to retain multi-line props in JSX/HTML #3101 - GitHub
Retain line breaks. Update: I opened this a long while back but after two years of using Prettier I absolutely, without question, and...
Read more >
Hooks FAQ - React
Do Hooks replace render props and higher-order components? ... In the longer term, we expect Hooks to be the primary way people write...
Read more >
Error Boundaries - React
React doesn't need error boundaries to recover from errors in event handlers. Unlike the render method and lifecycle methods, the event handlers don't...
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