Yarn

Recent twts in reply to #m7o5dpa

I can probably contribute the most on the pwa repo.

Actually, if you’re good with Javascript and specifically MithrilJS you could help us get the PWA repo/project – Currently it’s just a bit of a skeleton. I also don’t like to use NodeJS or NPM as you can tell 😅 over complicates things for me!)

⤋ Read More

@prologic@twtxt.net The PWA setup is a bit confusing to me, can you explain how to run it?

I can see that you’re using the templating in the html but i’m lost on how it bind with the backend.

My usual PWA setup is entirely separated from the backend.

I also worked a lot with NodeJS too and now i’m working on creating a bundle-less setup that is light and easy to use and don’t need any tooling at all except for a static server and a browser.

⤋ Read More

@justamoment@twtxt.net The original idea was to run the “PWA” as a Pod-level configured theme. In other words you could point a yarnd server via -t/--theme to the directory for the pwa theme and voila. But this is probably a bad idea, so you can largely ignore most of the templating you see there, it would only get used once to render the index.html or / anyway – the PWA takes over at that point via it’s Javascript and Service Worker, etc…

⤋ Read More

@prologic@twtxt.net Great, I’ll check out the PWA first then!👍

While MithrilJS is a good library I find if wasted when not used with JSX, you can probably enhance the syntax by using htm for the templating if you want to keep it light or use the renderer of esbuild directly.

In my projects I usually use uhtml, it’s a simple to use and blazing fast templating library, It doesn’t even use the Shadow DOM the usual JSX rely on, you should try it for your next project. 😜

⤋ Read More

@justamoment@twtxt.net Haha sorry but I’m not a Javascript developer, I really honestly can’t stand the language and all the modern buillshit being added to it over the last few years 🤦‍♂️ I blame Facebook and Google 😂

I’d like to steer clear of things ike JSX, etc. MithrilJS fortunately lets you just write regular things like:

export default function Login (vnode) {
  const { context } = vnode.attrs;

  return {
    view: function () {
      return m("twt-login",
        m("form", [
          m("input", {"type":"text","placeholder":"Username"}),
...

👌

⤋ Read More

In other words I really don’t mind there being two different complete user experiences here, the embedded SSR Web Interface in yarnd and the separate SPA/PWA with a mobile-first design and a more “native”(ish) feel 😅

The trick will be to reuse as much code between what drives the API and the SSR so changes, improvements or new features can be rolled out to the API, SSR and PWA all at once quite easily… 🤞

⤋ Read More

@justamoment@twtxt.net Use of Fetch APi is fine, in fact most of the new API(s) are fine by me really Web Push, Service Workers, Fetch, etc. These all provide quite useful functionality IHMO when it comes to building apps with web technologies 👌 But things like JSX, => (arrow functions) and all the new so-called “modern” language in Javascript is just well umm crap IHMO 😅

⤋ Read More

@prologic@twtxt.net I can agree on JSX and similar but I must say that arrow functions, classes and so on are quite nice once you get used to them.

I too ended up wanting less and less but exactly for that reason I really enjoy those new stuff the platform offers natively.

Anyway, I’ll keep your style as much as I can. 👍

⤋ Read More

Participate

Login to join in on this yarn.