Code split the client, update dependencies

This commit is contained in:
Ken-Håvard Lieng 2018-11-04 07:22:46 +01:00
parent 84c3d5cc88
commit d930365eeb
37 changed files with 2036 additions and 1181 deletions

View file

@ -1,10 +1,12 @@
import React, { PureComponent } from 'react';
import React, { PureComponent, createRef } from 'react';
import { VariableSizeList as List } from 'react-window';
import AutoSizer from 'react-virtualized-auto-sizer';
import classnames from 'classnames';
import UserListItem from './UserListItem';
export default class UserList extends PureComponent {
list = createRef();
getSnapshotBeforeUpdate(prevProps) {
if (this.list.current) {
const { users } = this.props;
@ -43,8 +45,6 @@ export default class UserList extends PureComponent {
return index;
};
list = React.createRef();
renderUser = ({ index, style }) => {
const { users, coloredNicks, onNickClick } = this.props;