-
-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate brisk reconciler core #207
Conversation
let subscribe = (evt: t('a), f: cb('a)) => { | ||
evt := List.append(evt^, [f]); | ||
let unsubscribe = () => { | ||
evt := List.filter(f => f !== f, evt^); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to bring this to brisk-reconciler
if possible. RemoteAction allows for just one subscriber.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wokalski , please feel free to bring it over 👍 (It had lived in reason-reactify
before, anyway).
src/UI/Primitives.re
Outdated
let text = | ||
( | ||
/* TODO: Proper way to downcast? */ | ||
let tn: TextNode.textNode = Obj.magic(node); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Admittedly this is problematic about this API if you don't work with abstract types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely. We'll likely revisit the decision to use class nodes or experiment / profile some alternate approaches.
https://github.com/briskml/brisk-reconciler you can use this repo now! |
Excellent, thanks @wokalski ! Just waiting on CI but I think this is almost ready 🎉 Are you planning on publishing an NPM package, too? |
@bryphe if it’s not problematic for others I’d rather not just yet. I would like to rename a few types which might are technically breaking changes. Also, there might be further changes to the Hooks api (I.e. maybe you’ll return hooks from render). But when we have the ppx and the naming is ok, I’ll start publishing to npm. |
WIP: Replace
reason-reactify
withbrisk-core
This change:
nativeComponent
from briskRemaining work:
Hello.re
migrationuseState
in nested tree ([Test case] State update in subtree not being picked up briskml/brisk#31)useEffect
implementationuseEffect
useEffect
uiDirty
primitive and only render when an update is needed)link:
resolution with an NPM package forbrisk-core
esy.lock
w/ dependency updateHooks.effect
with conditionOnMount