Hooks API Discussion
See original GitHub issueSomebody was going to ask eventually! The new hooks API could possibly help here. I think most of the API can pretty much stay the same, with the HOC mapping directly into a hook.
I do wonder if we can replace connectDragSource
and connectDropTarget
with just passing in the value of useRef
. It could definitely make stuff cleaner if that’s possible!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:12
- Comments:43 (19 by maintainers)
Top Results From Across the Web
Hooks API Reference
This page describes the APIs for the built-in Hooks in React. If you're new to Hooks, you might want to check out the...
Read more >Discussion: Potential hooks API design · Issue #1179
Let's use this thread to discuss actual design considerations for an actual hooks API. Prior references: #1063: Provide React Hooks #1177: ...
Read more >React New hook | In Discussion | use() - YouTube
Their is a discussion ongoing on react panel about proposing a new hook which will be use to fetch data from API and...
Read more >Clean API Call With React Hooks
Hi Stefan,. I don't think so. We often focus first on things that have direct benefits to most users (e.g. performance, security...). But...
Read more >APIs and Hooks
APIs and Hooks. ... How to re-use custom code page functionality in api? Started by vinay_jadhav. 0 Replies 399 Views. HOOK / Changes...
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 FreeTop 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
Top GitHub Comments
So, to ease up on my earlier comment, the API in #1280 is shaping up to be better than I first thought. Feel free to comment here or there
So I spent a bunch of time last night reworking the hooks API to use connector functions. As far as API design goes, I really fucking hate it.
My next thought is that we can return a callback-ref instead of a ref-object. This should give us flexibility to use as a ref directly or to pass a ref into it
Using Directly:
Chaining
With Ref Object