Usage of builders
See original GitHub issueI 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:
- Created 8 years ago
- Comments:5 (1 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
Yeah, it looks like you can use both now. Closing this issue unless there needs to be more clarification.