Y
Hacker News
new
|
ask
|
show
|
jobs
Show HN: React, declaratively define custom event data
(
github.com
)
1 points
by
thenewvu
3220 days ago
1 comments
fiatjaf
3220 days ago
I don't like your solution (although it is better than your description of the current use-case). I prefer to use:
onClick (e) { this.doSomething(data) }
link
thenewvu
3220 days ago
Yeah .. it's (the package) totally an opinionated solution, but hey .. why do you prefer imperative than declarative? Just want to hear your opinion, I'm open to any idea.
link
fiatjaf
3220 days ago
I would prefer declarative if I didn't need to install a package. Every dependency is a burden.
link
thenewvu
3220 days ago
hm ... yeah, you're right.
link