Add initial tools for managing derivations and React compatibility (#202)

Co-authored-by: Cole Lawrence <cole@colelawrence.com>
Co-authored-by: Elliot <key.draw@gmail.com>
Co-authored-by: Aria <aria.minaei@gmail.com>
This commit is contained in:
Cole Lawrence 2022-06-09 13:12:40 -04:00 committed by GitHub
parent bebf281517
commit f1844952ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 320 additions and 30 deletions

View file

@ -179,7 +179,7 @@ function queueIfNeeded() {
*
* I'm happy with how little bookkeeping we ended up doing here.
*/
function useDerivation<T>(der: IDerivation<T>, debugLabel?: string): T {
export function useDerivation<T>(der: IDerivation<T>, debugLabel?: string): T {
const _forceUpdate = useForceUpdate(debugLabel)
const refs = useRef<{queueItem: QueueItem; unmounted: boolean}>(