OpenGL basic knowledge summary

Article catalog Image rendering pipeline The relationship among VAO, VBO and EBO Vertex attribute format Coordinate system Orthographic projection and perspective projection Combine transforms Right hand coordinate system video camera LookAt matrix Euler angle Glossary list Sample code interpreta ...

Posted on Fri, 05 Jun 2020 23:35:45 -0700 by affordit

useEffect of ReactHooks source code analysis

preface Let me give you an example React.useEffect(): import React, {useEffect} from 'react';import React from 'react';export default function App() {  useEffect(()=>{    console.log('classComponent: componentDidMount')    return ()=>{      console.log('classComponent: componentWillUnmount')    }  },[])  return (    <div>  ...

Posted on Sun, 31 May 2020 17:23:00 -0700 by pukstpr12

How React encapsulates native event objects

The purpose of this article is to see how react encapsulates an extensible object based on a native object with different types, more Encapsulated native object: Browser native event object nativeEvent Encapsulated constructor: synthetic event object First, determine which properties on the native object need to be used, and which prop ...

Posted on Sun, 31 May 2020 16:52:06 -0700 by graham

What you need to know about the implementation principle of React Router(hash mode)

Single page apps you should know What is a single page application? single page web application (SPA) is an application with only one Web page. A Web application that loads only a single HTML page and dynamically updates that page when the user interacts with the application. React and Vue are the main front-end frameworks for building singl ...

Posted on Sat, 30 May 2020 17:41:20 -0700 by djKale

Getting started with react - creating components (2) stateless function method

It's about inheritance React.Component Create the react component. The React component can also be constructed by stateless function. give an example <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>React Components</title> </head> <body> <!-- ...

Posted on Sat, 30 May 2020 08:30:02 -0700 by bhogg

Write a redux, react redux and the extension of Middleware (asynchronous thunk, printing logger)

The beggar version of the manual roll up is as follows. It only realizes the most basic functions: subscription, dispatch and access. However, it can be used easily. It's no problem to make a counter, and the core functions of redux can be seen more simply and roughly Note: the length of this article is long. It is recommended to read it slowl ...

Posted on Wed, 13 May 2020 22:28:54 -0700 by mady

babel version reason run error, solution

Problem encountered while learning babel, run error after installing with old version of Babel naming rule. Preliminary find reason is because there are compatibility problems between different versions of Babel preset and plugin, prompting that npx babel-upgrade can be upgraded automatically, but my upgrade failed, prompting parsing error, lat ...

Posted on Mon, 11 May 2020 11:17:00 -0700 by duckduckgoose

Redux example analysis: todos

Code source: https://github.com/reactjs/redux/tree/master/examples/todos source folder structure (excluding tests, i.e. spec.js end file): - actions - index.js - components - App.js - Footer.js - Link.js - Todo.js - TodoList.js - containers - AddTodo.js - FilterLink.js - VisibleTo ...

Posted on Mon, 04 May 2020 00:11:01 -0700 by kumar_ldh

Advanced use of react router

Use objects instead of JSX to configure routes Once written: <Router> <Route path="/" component={App}> <IndexRoute component={Dashboard} /> <Route path="about" component={About} /> <Route path="inbox" component={Inbox}> <Route path="/messages/:id" component={Message ...

Posted on Fri, 01 May 2020 13:33:25 -0700 by mickfuzz

react route load on demand

In a single page application, it is very necessary to load the route on demand. If all js are loaded at one time, with the rich functions of the application, the js file will increase, and the first download will slow down, affecting the user experience. This article shares the on-demand loading of the react router V4 version. Asynchronously ...

Posted on Fri, 01 May 2020 06:06:47 -0700 by verdrm