Skip to content

Instantly share code, notes, and snippets.

var Table = function(names) {
this.names = names;
this.tbody = document.querySelector('.tbody');
}
Table.prototype.render = function() {
setInterval (function() {
var x = this.tbody.children.length;
}
}, 1000)
import { combineReducers } from 'redux';
import { routerReducer as routing } from 'react-router-redux';
import page from './page'
export default combineReducers({ routing, page });
import { SET_USER, FIND_NAME } from '../constants/Constants';
const initialState = {
activeUser: 0,
};
export default function activeUser(state = initialState, action) {
switch (action.type) {
case SET_USER:
return {
@4knort
4knort / Feedback
Last active November 22, 2016 13:21
1) header bg на всю ширину
2) our-work-products before with padding not margin
3) footer-contacts height 0
4) в модалке инпуты толкают родительский соседний блок
5) disable checkbox
6) popup product title fixed height
7) фиксированная высота зло
8) стараться все размеры кнопок делать паддингами
9) переполнение: кнопки в пагинейшн, навигация в продуктах, социалки в футере, фичерсы, партнеры
10) не стилизовать теги
@connect(state => ({
modifiedList: state.list.modifiedList,
activeUser: state.activeUser.activeUser,
}))
const App ({ modifiedList, activeUser }) => {
if(!Array.isArray(modifiedList)) {
return null
}
return (
const App = ({ modifiedList, activeUser }) => {
if(!Array.isArray(modifiedList)) {
return null
}
return (
<div className="container-fluid">
<SearchBarContainer />
<ToolBarContainer />
<div className="row">
<ActiveUser user={modifiedList[activeUser]} />
import React, { PropTypes } from 'react';
import { Route, IndexRoute } from 'react-router';
import { HotRouter } from 'utils';
import { IndexPage, UserPage } from 'pages';
import AppContainer from 'components/AppContainer';
const AppRouter = ({ history }) => (
<HotRouter history={history}>
<Route path="/" component={AppContainer}>
1) Изображения не импортятся
2) ajax запрос
@4knort
4knort / userlist
Last active November 27, 2016 10:00
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import UserData from '../components/UserData';
import * as userActions from '../actions/userActions';
import axios from "axios";
const UserListContainer = ({ modifiedList, setPosition }) => {
axios('/data.json').then(response => {
<div class="input-wrap">
<label for="" class="input-wrap__label"></label>
<input type="text" class="input-wrap__input">
</div>