Code Monkey home page Code Monkey logo

Comments (19)

ije avatar ije commented on May 21, 2024 4

@shadowtime2000 or no fragment

let count = 0;

<p>Count: {count}</p>;
<button onClick={() => count++}>Increment!</button>

from aleph.js.

ije avatar ije commented on May 21, 2024 3

@shadowtime2000 React is ever the first framework in Aleph.js, and i wish we can import react component in Alef Component in the future.

from aleph.js.

shadowtime2000 avatar shadowtime2000 commented on May 21, 2024 2

I like it's conciness though compare it with React

import { useState } from "react";

function Counter() {
  const [count, setCount] = useState(0);

  return (
    <>
      <p>Count: {count}</p>
      <button onClick={() => setCount(count + 1)}>Increment!</button>
    </>
  );
}
let count = 0;

<>
	<p>Count: {count}</p>
	<button onClick={() => count++}>Increment!</button>
</>

from aleph.js.

iFwu avatar iFwu commented on May 21, 2024 2

Thanks for replying. I got the difference now.
At first look, I thought the concept is fairly alike to SolidJS. But I didn't see how the reactivity will be like in an AOT compiler. I will check Svelte for the details. If fine-grained reactivity with JSX can be implemented without templates, I'll be very excited.

from aleph.js.

ije avatar ije commented on May 21, 2024 1

@shadowtime2000 yes, i will create a repo to implement this.

from aleph.js.

ije avatar ije commented on May 21, 2024 1

huge application may have this issue, most applications should be lighter than react, we will see

from aleph.js.

iFwu avatar iFwu commented on May 21, 2024 1

I think https://github.com/BuilderIO/jsx-lite and https://github.com/ryansolid/solid can be considered.

from aleph.js.

shinspiegel avatar shinspiegel commented on May 21, 2024 1

I was wondering, we already have a lot of frameworks and ways to implement reactive (and non-reactive) web interfaces, do we need another one?

I think, should be better to implement other frameworks like Vue and Angular, which would fit best?
Or I'm missing something?

from aleph.js.

shadowtime2000 avatar shadowtime2000 commented on May 21, 2024

I like how it uses more implicit sections like Marko instead of explicitly being separated into different parts. @ije Do you have an idea of what the compiler output may look like for it? With no runtime, would it just compile into some variable declarations and some document manipulations?

from aleph.js.

shadowtime2000 avatar shadowtime2000 commented on May 21, 2024

@ije I'd recommend you create the compiler and such in a different repo called alef or something to allow others to more easily use it without Aleph.

from aleph.js.

shadowtime2000 avatar shadowtime2000 commented on May 21, 2024

@shadowtime2000 or no fragment

let count = 0;

<p>Count: {count}</p>;
<button onClick={() => count++}>Increment!</button>

Wow, even better!

from aleph.js.

shadowtime2000 avatar shadowtime2000 commented on May 21, 2024

@ije I am not an expert on web performance and bundle size, but wouldn't having no runtime cause a big bundle size with stuff like reactivity, actually rendering stuff, and memoization?

from aleph.js.

shadowtime2000 avatar shadowtime2000 commented on May 21, 2024

@iFwu What exactly do you mean by that? The compiler I believe will already use something like what SolidJS does, except I think in some cases it won't even do that.

from aleph.js.

ije avatar ije commented on May 21, 2024

hey @iFwu, as @shadowtime2000 mentioned, the AOT compiler will transpile JSX to native Dom operations, no need to compile template in browser like solid do

from aleph.js.

shadowtime2000 avatar shadowtime2000 commented on May 21, 2024

@ije After v0.3.0 will we start slowly dropping React support or something? Or will React still be supported?

from aleph.js.

shadowtime2000 avatar shadowtime2000 commented on May 21, 2024

Will we add a feature like automatic selection of components depending on usage of Alef or React? Like if we import deno.land/x/aleph/link.ts, will it automatically import a deno.land/x/aleph/link/react.ts or a deno.land/x/aleph/link/alef.alef depending on what is importing it?

from aleph.js.

ije avatar ije commented on May 21, 2024

@shinspiegel i agree with you, the next stage(0.4) the most important idea i guess is to bring Vue to alephjs. Angular i'm not sure since i'm not the user of it.

from aleph.js.

ije avatar ije commented on May 21, 2024

however, the alef component is an experience feature i want to try.

from aleph.js.

shadowtime2000 avatar shadowtime2000 commented on May 21, 2024

I think Angular may not be fit for this because it has a ton of tooling that needs to be set up for it to work. Vue would be pretty nice in setting it up.

from aleph.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.