This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("./app.scss"); | |
import React from "react"; | |
import ReactDOM from "react-dom"; | |
import createReactClass from "create-react-class"; | |
import ColorPicker from "../../src/"; | |
import ColorSwatch from "./ColorSwatch"; | |
import colors from "./colors.json"; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const SomeStore = types | |
.model('SomeStore', { | |
settings: types.optional(Settings, {}), | |
key1: '', | |
key2: false, | |
}) | |
.actions(self => ({ | |
load: () => { | |
makeYourAjaxCall().then(response => self.update(response.data)) | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Функция принимает всего лишь один аргумент: порядковый номер коммента, который надо найти | |
// Она сама тыкает на плюсик если надо еще подгрузить комеентов | |
// Найденный коммент выделяется желтым и страница сама к нему проскролится | |
// With <3 from iurevych | |
function findComment(commentToFind) { | |
const commentsCount = document.querySelectorAll('ul [role="button"]').length - 1 | |
if (commentsCount < (commentToFind - 1)) { | |
const expandMore = document.querySelector('[aria-label="Load more comments"]') |
OlderNewer