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.

Usage of builders

See original GitHub issue

I would like to understand why this library uses builders all over the place. It kinda works against react’s declarative approach.

Instead of using

render(){
    const ColoredRaisedButton = MKButton.coloredButton()
    .withText("Button")
    .withOnPress(() => alert("pressed"))
    .build();

    return (
      <ColoredRaisedButton />
    );
  }

It would be much more intuitive to just be able to use

<MKButton.ColoredButton text="Button" onPress={() => alert("pressed")} />

I’m happy to help if this is something you could imagine for future versions.

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
timjacobicommented, Mar 14, 2016

Sure I will create a fork, refactor a couple of components and then let you have a look so you can decide whether you want that in here.

0reactions
alexprice1commented, Jun 2, 2016

Yeah, it looks like you can use both now. Closing this issue unless there needs to be more clarification.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Builder Definition & Meaning - Merriam-Webster
The meaning of BUILDER is one that builds; especially : one that contracts to build and supervises building operations. How to use builder...
Read more >
java - When would you use the Builder Pattern? - Stack Overflow
Factories are used for creating different types of objects that are the same basic type (implement the same interface or base class). Builders...
Read more >
The best 200 builders sentence examples
How to use builders in a sentence. Example sentences with the word builders. The most voted sentence example for builders is Alex had...
Read more >
Q: What Tools Do Builders Use - ZipRecruiter
A: Builders use a variety of tools and equipment on construction sites. Basic tools include a hand saw, hammer, sander, or drilling tools,...
Read more >
Meaning of builder in English - Cambridge Dictionary
Want to learn more? Improve your vocabulary with English Vocabulary in Use from Cambridge. Learn the words you need to communicate with ...
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