I hereby claim:
- I am miladbruce on github.
- I am miladbruce (https://keybase.io/miladbruce) on keybase.
- I have a public key whose fingerprint is 07D9 64B8 96C5 9687 6B7C 1F2E 621B 1A5E 9AF2 1DDE
To claim this, I am signing this object:
function isEmpty(x) { | |
if(Array.isArray(x) | |
|| typeof x === 'string' | |
|| x instanceof String | |
) { | |
return x.length === 0; | |
} | |
if(x instanceof Map || x instanceof Set) { | |
return x.size === 0; |
import React, {useState, Fragment} from 'react'; | |
// React v16.7.0-alpha | |
export default function App(props) { | |
const [name, setName] = useState('user'); | |
handleSubmit = value => { | |
setName(value); | |
} | |
retuen( | |
<Fragment> |
import React, {lazy, Suspense, Fragment} from 'react'; | |
//reactjs vestion should be 16.6.0 | |
const Product = lazy(() => import('./Product')); | |
function LazyComponent() { | |
return ( | |
<Suspense fallback={ | |
<Fragment> | |
Loading... | |
</Fragment> |
import { memo } from 'react'; | |
//reactjs vestion should be 16.6.0 | |
function List(props) { | |
// Component Code | |
} | |
export dafault memo(List); |
import React from 'react'; | |
import { Switch, Route } from 'react-router-dom'; | |
import asyncFunction from './asyncFunction'; | |
class Router extends React.Component { | |
render() { | |
return ( | |
<Switch> | |
<Route | |
exact |
import React, { Component, Fragment } from 'react'; | |
import Nprogress from 'nprogress'; | |
import ReactPlaceholder from 'react-placeholder'; | |
import 'nprogress/nprogress.css'; | |
import 'react-placeholder/lib/reactPlaceholder.css'; | |
export default function asyncFunction(importedComponent) { | |
class ReactAsyncComponent extends Component { | |
constructor(props) { |
I hereby claim:
To claim this, I am signing this object: