-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Add features: createRoot, PromiseWrapper, and react lazy #587
base: main
Are you sure you want to change the base?
Conversation
… but work in my own use cases. Much polish is still needed and help wanted.
addresses: #196 |
Thanks for the PR @evbo! This will be a great starting point for getting Slinky up to speed with the latest React features. In the near future, would you be able to fix some of the formatting issues? That way we can get this merged and start working on followup testing. |
Wondering what needs to be done to get this in |
|
||
class PromiseWrap[T](suspend: Future[T]) extends js.Object { | ||
private val pending = suspend.toJSPromise | ||
private var data: Option[T] = None |
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.
this shouldn't be private as I'm finding often non-presentational logic may want to check the existence of data without triggering unnecessary exceptions to be thrown
I pretty much just threw the code over the wall, missing some unit testing opportunities, code cleanliness here and there. I left a comment with the only functional change I would still make. |
Hi,
I am very short on time and had to "throw this over the wall" but here are 3 very important React features I'm using for my own needs:
ReactDOM.render
and if not used will limit React features to version 16Suspense
for experimental data fetching from any arbitrary sourceSuspense
A lot of testing is needed and code cleanup. I am hoping the Slinky community is patient with these WIP changes and is willing to help out a bit too. I will try to support more in time but I wanted to initiate the PR just to get the ball rolling with at least baseline functionality.
Thanks!