Skip to content

Instantly share code, notes, and snippets.

View Aziaev's full-sized avatar
🎯
Focused

Artur Ziaev Aziaev

🎯
Focused
View GitHub Profile
export const asyncValidate = (values) => {
if (values.lmsCourseGeneralInfo.productISBN && !ISBN_REGEXP.test(values.lmsCourseGeneralInfo.productISBN)) {
return sleep(100).then(() => {
// eslint-disable-next-line no-throw-literal
throw {
lmsCourseGeneralInfo: {
productISBN: VALIDATION_ERR_MESSAGE_PRODUCT_ID_FORMAT,
},
};
});
@Aziaev
Aziaev / gist:fb3120cd5261c040f5e83c2bb40a5eb1
Created August 29, 2018 07:51
mapDispatchToProps functions invoked
-------------------Tested component-------------------
// All required imports
export class App extends React.Component<Props> {
render() {
const { onClick } = this.props;
return (
<>
<h1>Form</h1>
<input />
@Aziaev
Aziaev / gist:a81165ad542805ef7567ba250bbb7060
Created August 23, 2018 16:28
eslintrc and package.json
{
"extends": [
"standard",
"standard-react",
"plugin:react/recommended",
"plugin:jest/recommended",
"plugin:flowtype/recommended"
],
"plugins": [
"react",
my-app
├──README.md
├──node_modules
├──package.json
├──.gitignore
├──.eslintrc
├──public
│ ├──favicon.ico
│ ├──index.html
import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args) {
List<Integer> arr = new ArrayList();
boolean run = true;
for (int i = 0; i < 10; i++) {
arr.add(i);