React list & Keys simple demo
Traversing the array using the map() method produces a list of numbers from 1 to 5
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
import PropTypes from 'prop-types';
const arr=[1,2,3,4,5];
const items=arr.map(val=>
...
Posted by Fitzlegend on Tue, 14 Apr 2020 07:34:29 -0700
Error in v-on handler: "TypeError: Cannot read property 'value' of undefined"
Error in v-on handler: "TypeError: Cannot read property 'value' of undefined"
Errors are reported as follows:
The above error occurred while running the Vue project because its container was initialized before it was generated.
First, check whether there are the following operations
//The original operation of fetching dom
document.getElementB ...
Posted by BenMo on Tue, 14 Apr 2020 07:35:17 -0700
Cannot read property 'value' of undefined
Error in v-on handler: "TypeError: Cannot read property 'value' of undefined"
Errors are reported as follows:The above error occurred while running the Vue project because its container was initialized before it was generated.
First, check whether there are the following operations
//The original operation of fetching dom
document.getElementBy ...
Posted by almystersv on Tue, 14 Apr 2020 07:11:20 -0700
Four Operational Generators for Primary School
Github project address: https://github.com/bravedreamer/test/tree/master/Arithmetic
Online preview: https://bravedreamer.github.io/test/Arithmetic/index.html
Project Partner: Wu Shangqian 3118004977 Wu Maoping 3118004976
1. Title Description
Implements a command line program that automatically generates four arithmetic titles for elementary s ...
Posted by VanPEP on Mon, 13 Apr 2020 10:55:17 -0700
Simple demonstration of React event processing
html version:
<button onclick="activateLasers()">
Activation button
</button>
react version
<button onClick={activateLasers}>
Activation button
</button>
You cannot block the default behavior by returning false. You must explicitly use preventDefault
html version
< a href = "ා" onclick = "con ...
Posted by sevenfive on Mon, 13 Apr 2020 10:11:52 -0700
Class component, functional component, JSX syntax, data-driven design idea and event binding, TodoList function, etc. in React
What is JSX syntax
In JSX syntax, there are two types of tags:
1. Normal html tags (lowercase initial)
2. Component label (capitalized)
Using React to write TodoList function
src/TodoList.js
import React,{Fragment} from 'react';
function TodoList() {
return (
<Fragment>
<input type="text" />
<ul>
...
Posted by joviyach on Mon, 13 Apr 2020 09:15:16 -0700
React Props simple demo
The main difference between state and props is that props is immutable, and state can be changed according to the interaction with users.
Set the default value for props through the defaultProps property of the component class
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './A ...
Posted by mottwsc on Mon, 13 Apr 2020 07:51:57 -0700
Click the mouse to show love + socialist values + random color text + mouse cursor custom image
js animation - click to show love
Just put the following JS code before < / body >
<script type='text/javascript' src='//api.dujin.org/js/aixintexiao.js'></script>
Full code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, i ...
Posted by aconite on Sun, 12 Apr 2020 21:45:10 -0700
vue2.x learning notes
Next, the previous content: https://www.cnblogs.com/yanggb/p/12586416.html.
Input binding of forms
The input binding of forms is a very important part, because all business systems are inseparable from the input function of basic forms, so it is necessary to carefully grasp the relevant knowledge points.
Basic usage
You can use the [v-mode ...
Posted by rishiraj on Sat, 11 Apr 2020 20:06:03 -0700
One of webpack learning, basic use and management of resources
Learning is in the Chinese web pack, just this record for later review;
(https://doc.webpack-china.org/guides/getting-started/#-)
Write before:
I think there are four basic modules of webpack that I should know before learning:
1. Entrance
2. Export
3.loader
4. Plug-ins
I. Basic Use
Follow the steps ...
Posted by dineshsjce on Sat, 11 Apr 2020 09:37:56 -0700