https://medium.com/@ericclemmons/react-event-preventdefault-78c28c950e46
https://facebook.github.io/react/docs/events.html
event.preventDefault();
// Let's stop this event.
event.stopPropagation();
// Really this time.
handleKeyDown(event) {
if (event.keyCode === 13) {
event.preventDefault(); // Let's stop this event.
event.stopPropagation(); // Really this time.
alert("Is it stopped?");
// "Hahaha, I'm gonna submit anyway!" - Chrome
}
}
GitHub API
https://api.github.com/users/xgqfrms
{ "login": "xgqfrms", "id": 7291672, "avatar_url": "https://avatars1.githubusercontent.com/u/7291672?v=3", "gravatar_id": "", "url": "https://api.github.com/users/xgqfrms", "html_url": "https://github.com/xgqfrms", "followers_url": "https://api.github.com/users/xgqfrms/followers", "following_url": "https://api.github.com/users/xgqfrms/following{/other_user}", "gists_url": "https://api.github.com/users/xgqfrms/gists{/gist_id}", "starred_url": "https://api.github.com/users/xgqfrms/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/xgqfrms/subscriptions", "organizations_url": "https://api.github.com/users/xgqfrms/orgs", "repos_url": "https://api.github.com/users/xgqfrms/repos", "events_url": "https://api.github.com/users/xgqfrms/events{/privacy}", "received_events_url": "https://api.github.com/users/xgqfrms/received_events", "type": "User", "site_admin": false, "name": "xgqfrms", "company": "xray", "blog": "https://www.xgqfrms.xyz", "location": "shanghai", "email": null, "hireable": true, "bio": "Hello World!", "public_repos": 202, "public_gists": 3, "followers": 28, "following": 1, "created_at": "2014-04-14T15:12:30Z", "updated_at": "2017-06-10T09:04:07Z" }test website
https://cdn.xgqfrms.xyz/index.html
Fetch
Axios
Getting Started With Axios (Accessing REST Web Services HTTP APIs in JavaScript) [Full HD,1920x1080].mp4