Skip to content

Instantly share code, notes, and snippets.

@bigslycat
bigslycat / main.js
Last active November 6, 2018 18:28 — forked from Msx1/main.js
$(document).ready(function () {
$('.deleteUser').on('click', deleteUser)
});
function deleteUser() {
alert('Опа ' + $(this).data('id') + ' гангнам стайл!');
if (confirm('Are You Sure?')) {
$.ajax({
type: 'DELETE',
@bigslycat
bigslycat / findify_challenge.md
Last active January 24, 2018 13:33 — forked from Bitaru/findify_challenge.md
Findify Challenge

TASK:

Implement a "withModal" high order component (HOC) that will accept two arguments [modalName: String] and [modalComponent: React.Component]. It should render a "modalComponent" into the portal. In addition, this HOC should inject 'showModal' and 'hideModal' handlers into a new collection of props that are passed to the base component. For instance:

import React, { Fragment } from 'react'
import { createPortal } from 'react-dom'

import {
  withStateHandlers,
/* @flow */
export type ResponseError = {
success: false,
message: string,
};
export type GetClientByBarcode = {
success: true,
result: {
'use strict';
import React from 'react';
class Controls extends React.Component {
constructor(props) {
super(props);
this.controlsStyle = {position: 'absolute'};
}
moveLeft = () => this.props.swapModules(this.props.module, 'left');