/*
Copyright (c) 2018-2019 Uber Technologies, Inc.

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import StatefulListContainer from './stateful-list-container.js';
import List from './list.js';

const defaultStateReducer = (type, nextState) => nextState;

function StatefulList(props) {
  return React.createElement(StatefulListContainer, props, componentProps => React.createElement(List, componentProps));
}

StatefulList.defaultProps = {
  initialState: {
    items: []
  },
  stateReducer: defaultStateReducer
};
export default StatefulList;