Skip to content

Instantly share code, notes, and snippets.

View a-mujthaba321's full-sized avatar
🌴
On vacation

Ali Mujthaba a-mujthaba321

🌴
On vacation
View GitHub Profile
@a-mujthaba321
a-mujthaba321 / .htaccess
Last active November 16, 2019 08:34
.htaccess file for React Production Deployment on Apache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule . /index.html [L]
const webpack = require('webpack');
const CompressionPlugin = require('compression-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = (env, argv) => {
console.log('ENV', argv.mode);
const isProduction = argv.mode === 'production';
return {
@a-mujthaba321
a-mujthaba321 / formik_demo.js
Last active July 16, 2018 14:44
Formik Demo
import React from "react";
import { render } from "react-dom";
import { withFormik } from "formik";
const App = ({ values }) => (
<div>
<input type="email" placeholder="email" name="email" value={values.email} />
</div>
);