React.js

Discussion in 'JavaScript' started by KewL, Jul 8, 2015.

  1. #1
    Anyone use it before? Seems like it's blowing up right now and the direction a lot of people are moving. Trying to get started with it.

    http://facebook.github.io/react/
     
    KewL, Jul 8, 2015 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #2
    While popular, that doesn't necessarily make it good -- or well written. In fact the bloated code and ignorance shown by it's developers is a hefty chunk of why it's 50-60% larger in codebase than it needs to be given what it does. You know how I'm often saying when it comes to HTML, "If you don't know what's wrong with this:"?

    Well, if you don't know what's wrong with this:

    var EventConstants = _dereq_(15);
    var EventPropagators = _dereq_(20);
    var ExecutionEnvironment = _dereq_(21);
    var FallbackCompositionState = _dereq_(22);
    var SyntheticCompositionEvent = _dereq_(93);
    var SyntheticInputEvent = _dereq_(97);
    
    var keyOf = _dereq_(141);
    
    var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
    var START_KEYCODE = 229;
    Code (markup):
    Yeah, that. If you have a bunch of var in a row, use commas instead of saying VAR every blasted time!

    Sadly it reeks of some C programmer who hasn't learned enough JS sleazing out JS. This is plainly clear from stupidity like this:

    var SPACEBAR_CODE = 32;
    var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
    
    Since EVERY character encoding gracefully degrades to ascii... that should be:
    
    [code]var
      SPACEBAR_CODE = 32,
      SPACEBAR_CHAR = ' ';
    Code (markup):
    While what it does is cute, it wastes a LOT of scripting doing CSS' job; realtime editing and copy? FINE. Screwing around with CSS values from the scripting? NOT fine.

    Of course you know me; I see that 668k script, and that by itself is ten times larger than I'd allow a template's HTML+CSS+SCRIPTS+IMAGES to reach (not counting content images)!
     
    deathshadow, Jul 11, 2015 IP
  3. KewL

    KewL Well-Known Member

    Messages:
    245
    Likes Received:
    16
    Best Answers:
    3
    Trophy Points:
    128
    #3
    I'm sure it's far from perfectly written, but it's pretty cool seeing it live in action... All the live data coming in and out, all actions taking place in the background and no disruptions using it. It's pretty cool disconnecting the front end from the backend as well. I feel like it simplifies the process on both ends. Pretty impressed and it seems like this is the way a lot of webapps are headed.

    Have you every played with it or a comparable library?
     
    KewL, Jul 14, 2015 IP
  4. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #4
    Which is automatically a telltale for me it has no business on a website... but I'm NOT part of the "pageloads are evil" paranoia whackjob club, and on the whole as a USER absolutely HATE web applications.

    Whereas for me that "separation" should already exist in normal pageloads, and it seems to needlessly over-complicate the front-end.

    Whereas my distaste (ok, let's be honest, outright rabid hatred of bloated, slow, buggy inaccessible CRAP web apps) makes me worry when something "cool and trendy" comes along just to piss even FURTHER on functionality and usability. Good scripting should enhance functionality, not supplant much less provide it.

    Yeah, I've seen them come and go pretty much since the day JS was introduced. It just strikes me as the same dance, just a different tune. The type of painful scripttard BS that people are going to piss all over websites with making them even slower, less useful, and more agonizing to deal with.

    Again, see webmail -- where seven or eight years ago I had thought it was going to supplant mail clients; but now that the scripttards have gone truly nutters pissing all over it, I and many other users have been sent running screaming back to same. Thank's web crapplications!

    It's "neat", "cool", and "trendy" -- and does a great job addressing the question "Can we?"; I'm just not convinced anyone is asking "Should we?" which is why this type of scripting (particularly when it ends up on normal websites) does nothing but invoke two middle fingers from me: one for the developer, and one for the source they code in on.
     
    deathshadow, Jul 16, 2015 IP