brigand / brigand/react-two

change to high order component?

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2
Forks
0
PR merge metrics
No merged PRs in 30d

Description

```
03:57:54 anon: (me): I think using a function wrapping whole component (+decorator) would feel more natural, at least to me :p
03:58:05 anon: although can be a bit funny syntax wrapping class with function
03:58:16 anon: instead of this.two I mean
03:58:40 (me): anon, yeah, that is more conventional
03:58:58 (me): I forget why I did it this way, so probably no good reason :-)
03:59:11 anon: I guess you wanted to do something with the instance
03:59:31 (me): well it wouldn't be a true high order component because it needs to hijack render
04:00:06 (me): to replace the $bind props with value/onChange or similar
04:00:13 anon: I guess conventional way would be to use hoc and pass $bind as prop
04:00:32 anon: but that would result in some pretty cumbersome syntax
04:01:10 (me): also it needs to be able to access state
04:01:33 (me): though that could be worked around with a little extra code
04:01:37 anon: it could use ref to do that
04:01:54 (me): true
04:03:01 (me): I'll make a note to add a high order component variant
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.