cssscript.com

Minimal Clean Presentation Library For Web – make-slides

The make-slides JavaScript library transforms a group of content sections into a responsive, minimal, pretty clean presentation (full page slider) with navigation arrows and bottom progress bar. How to use it: Insert sectioned content into the document. <div class="make-slides"> <section>Slide 1</section> <section>Slide 2</section> <section>Slide 3</section> ... </div> Download and insert the make-slides.js script into the document. <script src="./js/make-slides.js"></script> Initialize...

programmer group

Why do event functions in React bind this?

The original is in my github Chinese, welcome to subscribe We usually write React as follows: class HelloMessage extends React.Component { constructor(props) { super(props); this.handleClick = this.handleClick.bind(this); //Binding this } handleClick(){ console.log( this ) } render() { const { count } = this.state; return ( <button onClick={ this.handleClick } >Hello</button> ); } } ReactDOM.render( <HelloMessage/>,document.getElementById('root') ); The above code works...

programmer group

ES6 Core Knowledge Mini Pack

More Content Attention GitHub 1. Give up using var Instead of using var, use: let: for variables with variable values const: For constants, values are immutable let num = 0; num = 1; console,log(num); // 1 const NEWNUM = 0; NEWNUM = 1; // Throw wrong 2. Use arrow function Arrow function automatically binds this One parameter may not be parenthesed, and other cases must be parenthesed (no parameters or multiple parameters) When {} of the arrow function is not used, it returns automatically // Auto-binding this Class Person { arrow...

programmer group

ECMAScript/Javascript AST (Abstract Syntax Tree)

In computer science, Abstract Syntax Tree (AST) is an abstract representation of the grammatical structure of source code. It represents the grammatical structure of programming language in the form of tree, and each node in the tree represents a structure in the source code. The reason why grammar is "abstract" is that the grammar here does not represent every detail of the real grammar. ECMAScript also has the corresponding abstract syntax tree (hereinafter referred to as AST). Today we will parse ECMAScript to see how our code...