Skip to content

Instantly share code, notes, and snippets.

View AmitKKhanchandani's full-sized avatar
📘
Learning

AmitKKhanchandani

📘
Learning
View GitHub Profile
@AmitKKhanchandani
AmitKKhanchandani / index.html
Created May 26, 2018 11:27
JS Bin redux counter example // source https://jsbin.com/gugexik
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="redux counter example">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://fb.me/react-15.1.0.js"></script>
<script src="https://fb.me/react-dom-15.1.0.js"></script>
@AmitKKhanchandani
AmitKKhanchandani / formdata-example.js
Created October 18, 2018 09:53
FormData Example with File from the input element
var file = $('#order_file').prop('files')[0];
var form_data = new FormData();
form_data.append('order_file',file)
$.each($('#ordercreate').serializeArray(), function (key, input) {
if (form_data.has(input.name)) {
form_data.set(input.name, input.value);
} else {
form_data.append(input.name, input.value);
}
});
@AmitKKhanchandani
AmitKKhanchandani / PurgeCss in Create React App without ejecting
Created February 23, 2023 21:38 — forked from DyadicGit/PurgeCss in Create React App without ejecting
remove unused css (PurgeCss) in Create React App without ejecting
//package.json
{
...
"devDependencies": {
...
"purgecss": "^3.0.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build && npm run purge-css",