a3w 3 days ago

react license applies then to products made with this stack? i.e. no product that meta thinks of as a competitor is allowed?

vishnudeva 3 days ago

+1 for Reflex. Truly amazing.

  • greener_grass 3 days ago

    How is it writing React without multi-line lambdas?

    They are everywhere in JavaScript and I couldn't imagine my day-to-day without them!

    • vishnudeva 3 days ago

      I think my answer: I have no idea what multi-line lambdas are, probably explains why I find Reflex (or Rio/Streamlit, etc) amazing, haha

      For a person with zero front-end knowledge, it's a game changer.

      • greener_grass 3 days ago

        In JavaScript you can do this:

            const f = (x, y) => {
              const z = x + y;
              const w = z * 2;
              return z - w + x;
            };
        
        In Python, you cannot do this:

            f = (
              lambda x, y:
                z = x + y;
                w = z * 2;
                return z - w + x;
            )
        
        Instead, you need to pull it out into a def:

            def f(x, y):
              z = x + y;
              w = z * 2;
              return z - w + x;
        
        Sometimes, this is no big deal. But other times, it's damn annoying; the language forces you to lay out your code in a less intuitive way for no obvious benefit.
    • Retr0id 3 days ago

      Rio components are classes, so you could create a named class method and reference it. Obviously not the same thing as multi-line lambdas but it'd be the pythonic approach imho.

    • mixmastamyk 3 days ago

      Either name them, or squeeze multiple expressions into a tuple. More can be done, now with walrus.

    • wiseowise 3 days ago

      > They are everywhere in any proper programming language

      FTFY.