Skip to content

Instantly share code, notes, and snippets.

View emseidov's full-sized avatar

Emrah Seidov emseidov

View GitHub Profile
import React from "react";
export default function withCounter(Component) {
return class extends React.Component {
constructor() {
super();
this.state = {
count: 0,
};
import { useCounter } from '../hooks';
export default function CounterWithHooks({ count, increment, decrement }) {
return (
<>
<p>Count: {count}</p>
<button type="button" onClick={increment} />
<button type="button" onClick={decrement} />
</>
)
import React from 'react';
export default function useCounter() {
const [count, setCount] = React.useCounter(0);
function increment() {
setCount(count + 1);
}
function decrement() {
[test]: Update test/* files
[dist]: Changes to submodules, version bumps, updates to package.json
[minor]: Small changes
[doc]: Updates to documentation
[fix]: Bug fixes
[bin]: Update binary scripts associated with the project
[refactor]: Refactor of existing code
[nit]: Small code review changes mainly around style or syntax
[feat]: New features
@emseidov
emseidov / laser-wave-adjustments.js
Created May 10, 2020 03:25
LaserWave adjustments.json
"editor.tokenColorCustomizations": {
"[LaserWave Italic]": {
"textMateRules": [
{
"scope": [
"comment.block",
"comment.line.double-slash.js.jsx",
"comment.line"
],
"settings": {
import React from 'react';
import ReactDOM from 'react-dom';
import _ from 'lodash';
import shortid from 'shortid';
const App = () => {
const experiment = n => console.log(n);
return (
<h1>