Click here to Skip to main content
15,925,440 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Explaining JavaScript and this to people. Pin
Jeremy Falcon3-Dec-17 15:02
professionalJeremy Falcon3-Dec-17 15:02 
GeneralRe: Explaining JavaScript and this to people. Pin
Rob Grainger4-Dec-17 1:38
Rob Grainger4-Dec-17 1:38 
GeneralRe: Explaining JavaScript and this to people. Pin
Jeremy Falcon4-Dec-17 4:26
professionalJeremy Falcon4-Dec-17 4:26 
GeneralRe: Explaining JavaScript and this to people. Pin
Marc Clifton4-Dec-17 5:19
mvaMarc Clifton4-Dec-17 5:19 
GeneralRe: Explaining JavaScript and this to people. Pin
Jeremy Falcon4-Dec-17 6:05
professionalJeremy Falcon4-Dec-17 6:05 
GeneralRe: Explaining JavaScript and this to people. Pin
Marc Clifton4-Dec-17 11:08
mvaMarc Clifton4-Dec-17 11:08 
GeneralRe: Explaining JavaScript and this to people. Pin
Jeremy Falcon4-Dec-17 12:11
professionalJeremy Falcon4-Dec-17 12:11 
GeneralRe: Hey check this out... Pin
Jeremy Falcon3-Dec-17 15:27
professionalJeremy Falcon3-Dec-17 15:27 
Just to give you an idea of where the web is headed, here is some ES2015 code...
javascritp
import React from 'react';
import {Link} from 'react-router';

class Layout extends React.Component {
   // this requires that the class fields and static properties plug-in is enabled
   static propTypes = {
      children: PropTypes.object.isRequired
   };

   render() {
      // returned JSX must be within parenthesis
      return (
         // class is a reserved word in JavaScript so we use className instead
         <div className="container-fluid">
            <p>header here and all</p>
            {this.props.children}
         </div>
      );
   }
};

export default Layout;
Btw, that's not HTML inside the render method. It's just syntactic sugar to look like it. It gets transpiled down to JavaScript. But the only strings you'll see here are in the imports (which isn't much different than C/C++ includes) and the properties that will be spit out to the browser such as "container-fluid". Well, there is the literal there too, but none of the $($($($('omg')))) stuff. Laugh | :laugh:

Now, I'm not saying everything is perfect with the web. But new-skool web development (especially as WASM gets more popular) is nothing like old-skool web development.
Jeremy Falcon

GeneralRe: Hey check this out... Pin
Chris Maunder3-Dec-17 15:43
cofounderChris Maunder3-Dec-17 15:43 
GeneralRe: Hey check this out... Pin
Jeremy Falcon3-Dec-17 16:02
professionalJeremy Falcon3-Dec-17 16:02 
GeneralRe: Hey check this out... Pin
Marc Clifton4-Dec-17 5:22
mvaMarc Clifton4-Dec-17 5:22 
GeneralRe: Hey check this out... Pin
Jeremy Falcon4-Dec-17 5:53
professionalJeremy Falcon4-Dec-17 5:53 
GeneralRe: Explaining JavaScript and this to people. Pin
jsc423-Dec-17 21:29
professionaljsc423-Dec-17 21:29 
GeneralRe: Explaining JavaScript and this to people. Pin
Nathan Minier4-Dec-17 1:32
professionalNathan Minier4-Dec-17 1:32 
GeneralRe: Explaining JavaScript and this to people. Pin
grolarbear4-Dec-17 2:11
grolarbear4-Dec-17 2:11 
GeneralRe: Explaining JavaScript and this to people. Pin
Marc Clifton4-Dec-17 5:26
mvaMarc Clifton4-Dec-17 5:26 
GeneralRe: Explaining JavaScript and this to people. Pin
PIEBALDconsult3-Dec-17 14:17
mvePIEBALDconsult3-Dec-17 14:17 
GeneralRe: Explaining JavaScript and this to people. Pin
Jeremy Falcon3-Dec-17 14:30
professionalJeremy Falcon3-Dec-17 14:30 
GeneralRe: Explaining JavaScript and this to people. Pin
Chris Maunder3-Dec-17 15:41
cofounderChris Maunder3-Dec-17 15:41 
GeneralRe: Explaining JavaScript and this to people. Pin
Jeremy Falcon3-Dec-17 16:00
professionalJeremy Falcon3-Dec-17 16:00 
GeneralRe: Explaining JavaScript and this to people. Pin
Jörgen Andersson3-Dec-17 19:39
professionalJörgen Andersson3-Dec-17 19:39 
GeneralRe: Explaining JavaScript and this to people. Pin
Jeremy Falcon3-Dec-17 20:40
professionalJeremy Falcon3-Dec-17 20:40 
GeneralRe: Explaining JavaScript and this to people. Pin
Rob Grainger4-Dec-17 1:57
Rob Grainger4-Dec-17 1:57 
GeneralRe: Explaining JavaScript and this to people. Pin
Jeremy Falcon4-Dec-17 4:27
professionalJeremy Falcon4-Dec-17 4:27 
GeneralRe: Explaining JavaScript and this to people. Pin
KarstenK3-Dec-17 20:22
mveKarstenK3-Dec-17 20:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.