-
Notifications
You must be signed in to change notification settings - Fork 781
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
Road to 1.0 #244
Comments
Although all these may increase the lib size but they can be dispatched through separate packages like InfernoJS does ? |
|
Oh! I really wanted to work on From recycling of DOM nodes I meant to say that re-using the dom nodes upon their disposal. |
Or I can work on the website ? This will also led me to understand the core concepts and the design principles of the lib by writing about the api and their functionality. Let me know what you think ! |
I think here is a good place to start.
Be my guest! 👍 |
Ok so I will be rendering the docs on web. Meanwhile I will go through the link you provided and will start contributing ! |
Is there something on (HyperApp core) which I can hack? Other discussions are already on 🔥 ! I am interested in investing my time by working on HyperApp but don't know where to start. Like cli tool discussion does not have an answer and I feel growing that discussion further is unneeded. Same goes for other discussions. Anything ? |
@nitin42 you could try build an app with HyperApp; find a limitation and try improve it or find something that you find writing over and over again and try abstract that process out to a custom element or mixin? Or help build out functionality of example applications such as the Hacker News PWA. So we can get it up on https://hnpwa.com/ |
HNPWA seems a good idea!! |
I could implement :
I think I should start working! |
Should we use Github's "milestone" feature for 1.0? Not sure how it works, but this seems like the sort of use case they made that feature for. |
@jbucaran What's the plan for the relationship between picodom and hyperapp? If hyperapp wants to eventually consume picodom as a dependency, should that be part of 1.0 milestone? |
@andrewiggins At this point both vdom engines are the same, but I presume they might eventually begin to differ since both have different "core values". HyperApp is opinionated about state management, while picodom isn't. I also don't want to consume picodom in hyperapp, but it might happen. The probability is very low though. |
Why do we need both actions and events? Take this really vanilla app:
This is cool, but why not allow this:
|
ArchitectureI think the separation is important from an architecture point of view.
Now, you can also create custom events, in which case you are responsible for calling yourself, but they also work in the same way as the default events. Return ValuesActions return a partial state or a thunk, or maybe just call several other actions. Actions can be async functions too. Events reduce over some data by successively calling each event handler of the specified event. Consider the following example. const emit = app({
events: {
someEvent: [
(state, actions, data) => data + 1,
(state, actions, data) => data + 1,
(state, actions, data) => data + 1
]
}
}) And this is the result of firing console.log(
emit("someEvent", 10)
) // => 13 One-to-manyAn event can have more than one callback associated with it. myEvent: [handler1, handler2, handler3] An action is always a single call. These are some of my thoughts. I am sure that: setTimeout(function() {
emit('action', {name: 'updateImages', data: []});
}, 5000); Would be interesting, and we can consider the implications of making emit work in both ways, allowing you also to emit default events. |
@jbucaran I think it the time it took you to write this response, you could have made |
@brandonros It didn't take so long and this is good documentation for subscribers too! :) So, what about this: const Sender = emit => ({
events: {
send(state, actions, { name, data }) {
return actions[name](data)
}
}
})
const emit = app({
mixins: [Sender]
}) Then use it to call actions directly outside your app. emit("send", { name: "updateImages", data: [...] }) Making it work for |
@jbucaran Thank you for taking the time to supply that example. I appreciate that and I hope it helps somebody else. I've got one more "idea" that I came up with using this, just playing around with it. I really don't like having to set up Browserify or Webpack or all of that crap. I'm trying to avoid Babel + JSX as well, just for exercise. Back in the jQuery days, I used to do a lot of:
I saw you guys had the ability to use the (html`html string here`), but that requires Browserify. Is it possible to get compiled/ported so you can just include a page, and then call |
I just spent 15 minutes trying to figure out why the "load" event isn't working. Your codepad says it is 'init' instead of load. Please update the docs. https://github.com/hyperapp/hyperapp/blob/master/docs/events.md |
Load is in 0.11 which should be out anytime now... Master is ahead of npm publish by a bit. |
Thunks do not work and when I try to install it to help debug to provide more information (all I can get is a minified version), I get Edit: I see what you mean about master. Can you put the rollup.config.js in the repo please? Edit: I was trying to build an old version. Ignore, thanks! |
I recall someone else running into that when npm installing the package from master git repo. I have always had to make local copy and create a symlink in node_modules to the local repo to test newest version. Hopefully 0.11 will be out soon. |
@brandonros As import { h, app } from "hyperapp"
import helpers from "hyperscript-helpers"
const { div, h1 } = helpers(h)
app({
state: {
title: "Hi.",
},
view: state =>
div(null, [
h1(null, state.title)
])
}) I am also working on my own implementation, to create a more optimised (tree shaking, right |
They can get bigger than rollup if you are bundling a ton of modules, but that's because of how webpack works.
and
Also:
|
Webpack is fine ❤️ . I use it and the API is straightforward. @corysimmons Let's try to be a bit more civil 😛 Also scope hoisting has helped a ton! My boilerplate counter is only 2kb gzipped using webpack, So bundles being very large might not apply so much anymore. Let's not blame JS fatigue on a single library 🙏 Otherwise, I wonder if this should be a Mixin (official Mixin) or in core 🤔 Moving lazy loading talkSeparate issue: #379 |
Yeah I'm toxic. Bye guys. |
@corysimmons Whoa, I just said: "that's not very nice man" because you went on a little off-topic rant blasting webpack. And now you left the organization too? I don't get it, were you expecting anyone to support you on this or pretend you didn't say anything? |
@jorgebucaran is this referring to what #378 would do to help fix #373? |
@jorgebucaran I understand how to measure code size, but what metric are we using to determine performance in this instance? |
We use js-framework-benchmark. |
An interesting project to put on a test, will there be SSR support in 1.0 or this feature is not on a roadmap? |
@vladshcherbin Thanks! Hyperapp now provides automatic SSR hydration out of the box since 0.14.0. |
@jorgebucaran yeah, I've seen hydration in the docs. I mean, when a user requests a page, how do you generate html for this page on server (using node for example), is there any demo/repo of this? |
@vladshcherbin Entirely up to you to handle. If I was worried about SEO and time-to-interactive in a large-ish app, I would just send the HTML to the client and let Hyperapp hydrate it.
SSR is not my cup of tea, so I haven't been interested in making a demo or repo, but we hydrate pre-rendered HTML at work using Hyperapp already, so it works. Maybe @andyrj, @SkaterDad or @zaceno can comment about Hyperapp and SSR in general. 🙏 |
Sorry I'm no SSR-er either. Don't know how it works even in principle. But I'm curious to learn :) |
One thing I do know works, is: setting up a fake browser environment in node using jsdom or undom (well undom has a bug atm, but anyway), and then running hyperapp server-side, and serialize the fake dom into html. That would be server-side rendering with hyperapp, in my estimation. But I'm not sure that's what we're talking about. |
@zaceno @vladshcherbin - I've been playing with hyperapp/ssr/jsdom recently. I've thrown my discoveries and a working demo into a repo - https://github.com/maxholman/hyperapp-ssr-jsdom-example |
That's pretty much it! :) |
@jorgebucaran really?! And then what? You just serve up the plain HTML? Or hydrate it into a client side instance (which sounds like a lot of extra work for no extra benefit). I rhink I just haven't understood the point of SSR... Why not just use PHP then? (Not being sarcastic. Just explaining what it is I don't get) |
@jorgebucaran is there a way to Log state updates and action information to the console? |
@AlexanderChen1989 there's an official logger, although it's in the shop right now, getting a tune-up for compatibility with > 0.12.1 Hyperapp (post mixins). It will definitely be released before 1.0. |
@okwolf how can i implement old events like behavior? i have read new source code, but cannot find events like function |
@AlexanderChen1989 What were you trying to do exactly? Depending on what you are doing the solution may be different now that there are no custom events. |
im curious how to implement logger? |
@jorgebucaran good idea, thanks |
This issue is pretty far out of date with what is actually being worked on for 1.0.0 now. What should we do? |
Hmm, I want to merge #497 before I publish 1.0 and before I publish 1.0 I want to publish 0.18.0 so people that need it right now can start using it. EDIT: I'll close here when 1.0 is officially out. |
Closing in favor of #507! 🎁 🎉🚀 |
Components Components #238(See Components #238 (comment))[ ] Flow by @andyrj? adding initial attempt at flow type declarations. Need another pair o… #323 Add Typing (DTS file) #311[ ] Optimize patch?Post-1.0The text was updated successfully, but these errors were encountered: