-
Notifications
You must be signed in to change notification settings - Fork 79
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
What's coming next & Superfine v. Hyperapp #134
Comments
Was wondering if you're familiar with Raj: https://github.com/andrejewski/raj. Kinda similar goals to Hyperapp -- Elm Architecture for JavaScript. |
Yep. |
As it stands, what does Superfine provide that Hyperapp 1.0 does not and vice versa? |
@brandonros Superfine is just a Virtual DOM. You could use it with functional components and JSX for a bare bones fill-in for P/React. It's only 1KB. Hyperapp has a Virtual DOM but also provides state management inspired by the Elm Architecture. If you're using Superfine and need state management, you'll need to include Redux, Mobx or write your own solution. If you use Hyperapp, you get everything you need. |
@jorgebucaran, you mention a possible TypeScript rewrite for Superfine. What if you just stick with JavaScript and use JSDoc comments to define the types? If you're using VSCode or Webstore, you'll get type checking and intellisense right away. For VSCode you just add the following to you user settings: "javascript.implicitProjectConfig.checkJs": true This tells VSCode to use TypeScript to parse your JavaScript to understand the types. Now if you include JSDoc comments, then TypeScript will use those for understanding the types. You can define custom types, import types from other files, define union types, intersection types, even do type casting. All while writing JavaScript. They're just standard JavaScript comments, so they go bye-bye during minification. No need for a build like with TypeScript. Microsoft uses JSDoc comments in their Actually I already did a branch of Superfine with full JSDoc support, but I haven't pushed it to Github. I you want I could so you can check it out and see the difference it makes. |
So whose performance and diff is better now for superfine and hyperapp@2.0.0.alpha.10? Does superfine pursue performance and hyperapp control size in the future? |
@132yse Superfine and Hyperapp 2 share the same VDOM implementation (or close), so they should be about the same performance-wise. Hyperapp lacks lifecycle events and regular DOM events are bound to dispatch actions without an intermediate event handler, so it should perform better overall. |
@jorgebucaran But I found that superfine and hyperapp have different vdom algorithms at this time, hyperapp reduces a lot of bytes. Is performance getting better and better? Or did hyperapp lose some of its performance for size? |
@132yse You're probably looking at Hyperapp 1's VDOM, hence the confusion. Superfine (this project) and Hyperapp 2's VDOM code is essentially the same, therefore performance is the same too. Hyperapp 2 doesn't include lifecycle events (Superfine still does) and DOM events dispatch actions directly, making it faster than Superfine, but possibly not for a lot.
No, it didn't. |
Superfine 7 is out. I think we're done here. Some of the stuff I wrote up there is either outdated or never materialized. Check out the docs to know what's in it or not. 👋 |
Here is a mixed list of current and upcoming Superfine features and changes. Some of these may not be available to Hyperapp or vice-versa. I'm planning to work through these after Hyperapp V2 is out.
eventProxy
.JSX fragments (vnodes of type array) Add support for JSX fragments #71.Explore class components (not available to Hyperapp)The text was updated successfully, but these errors were encountered: