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.

What was the reason for the order of the arguments that was chosen?

See original GitHub issue

Any reason you didn’t choose to receive the Target last?

It would allow this:

import React from 'react';
import styled from 'styled-components';

const styleTitle = styled`
  text-align: center;
  color: palevioletred;
`;

const Title = styleTitle('h1')
const Subtitle = styleTitle('h4')

Basically styled would return a higher-order component that takes a component and applies the ruleset that was previously created. (It might also create an opportunity at some point to compose rulesets.)

I might not be thinking this through - obviously I only saw the library yesterday. And also, I’ve been working with ramda and recompose a lot recently. However, it does feels more right to me that the value you are applying a function to would be the last argument that is supplied to it rather than the first.

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
giuseppegcommented, Oct 15, 2016

Probably not a big deal but styled as HoC would make it possible to use it as decorator

@styled(`
  text-align: center;
  color: palevioletred;
`)
class MyComponent extends React.Component {
  /* ... */
}
1reaction
geelencommented, Oct 15, 2016

That… I don’t think will work. The presence of the ( or ) breaks the tagged template literals. Which we need… (more info

Would be pretty 😲 if it was possible tho!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Argument: Claims, Reasons, Evidence
Arguments are claims backed by reasons that are supported by evidence. Argumentation is a social process of two or more people making arguments,...
Read more >
Patrick Henry's Speech Questions Flashcards - Quizlet
Henry will contain the truth in his argument regardless of the cost of realizing the illusion of hope and will try to use...
Read more >
Toulmin Argument - Purdue OWL
Developed by philosopher Stephen E. Toulmin, the Toulmin method is a style of argumentation that breaks arguments down into six component parts: claim,...
Read more >
Visitor's Guide to Oral Argument - Supreme Court
A case selected for argument usually involves interpretations of the U. S. Constitution or federal law. At least four Justices have selected the...
Read more >
The Five Ways | Definition & Arguments - Britannica
The second of the Five Ways, the argument from causation, builds upon Aristotle's notion of an efficient cause, the entity or event ...
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