Skip to content

Instantly share code, notes, and snippets.

View kasiriveni's full-sized avatar
🎯
Focusing on Learning 💯🔥

Srinivas kasiriveni

🎯
Focusing on Learning 💯🔥
View GitHub Profile
@1Marc
1Marc / workshops-planning.md
Last active January 20, 2023 02:34
Workshop Planning

This gist is no longer in use.

Folder Structure

Please note

While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.

Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.

ES6

文法の基礎

変数展開

左辺にもブレスを書いて配列展開できる

[es6]
var arr = [1,2,3];
@danharper
danharper / gulpfile.js
Last active April 11, 2024 08:31
New ES6 project with Babel, Browserify & Gulp
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var browserify = require('browserify');
var watchify = require('watchify');
var babel = require('babelify');
function compile(watch) {
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel));
@PurpleBooth
PurpleBooth / README-Template.md
Last active April 29, 2024 02:38
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

const dùng để khai báo một hằng số - là một giá trị không thay đổi được trong suốt quá trình chạy.
const A = 5;
A = 10; // Lỗi Uncaught TypeError: Assignment to constant variable
let tạo ra một biến chỉ có thể truy cập được trong block bao quanh nó, khác với var - tạo ra một biến có phạm vi truy cập xuyên suốt function chứa nó.
function foo() {
let x = 10;
if (true) {
@Y2016
Y2016 / es6_class.js
Created November 5, 2016 09:27
ES6
// class
class Hamburger {
constructor() {
// This is the constructor.
}
listToppings() {
// This is a method.
}
}
@abhisheksliam
abhisheksliam / es6
Created November 15, 2016 11:56
es6
http://coenraets.org/present/es6
@BrianCortes
BrianCortes / Comments.jsx
Last active August 1, 2017 04:40
defaultProps and propTypes
Comment.defaultProps = {
valueInput: ''
}
Comments.propTypes = {
addComment: PropTypes.func.isRequired,
comments: PropTypes.array.isRequired,
changeText: PropTypes.func.isRequired
}