Skip to content

Instantly share code, notes, and snippets.

View atkinsio's full-sized avatar

Aaron Atkins atkinsio

View GitHub Profile
@atkinsio
atkinsio / react-state.js
Last active March 29, 2020 21:06
[React State] #react #js
import React, { useState } from 'react';
const App = () => {
//...
const [state, setState] = useState('');
//...
setState('xyz);
};
export default App;
@atkinsio
atkinsio / Component.js
Created March 29, 2020 20:57
[React Component] #react #js
import React from 'react';
import PropTypes from 'prop-types';
const Component = ({ prop }) => (
<div>
</div>
);
Component.propTypes = {
@atkinsio
atkinsio / lint.sh
Last active February 16, 2023 13:01
[Install ESLint & Prettier] #eslint #prettier #npm #bash
#!/bin/bash
npm install -D eslint prettier
npm install -D eslint-config-airbnb eslint-plugin-jsx-a11y eslint-plugin-import eslint-plugin-react babel-eslint
npm install -D eslint-config-prettier eslint-plugin-prettier
> ".eslintrc.js"
echo 'module.exports = {