1.1.0 • Published 10 years ago

react-component-list v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

React-Component-List

Code Climate Build Status

Usage:

import React, {PropTypes} from 'react';
import {renderToStaticMarkup} from 'react-dom/server';
import createList from 'react-component-list';

const Wrapper = ({children}) => <ul>{children}</ul>;
Wrapper.propTypes = { children: PropTypes.node.isRequired };

const ComponentList = createList(Wrapper);
ComponentList.push(<li>{'abc'}</li>);
ComponentList.push(<li>{'def'}</li>);
ComponentList.push(<li>{'ghi'}</li>);

renderToStaticMarkup(<ComponentList />);
/**
 *  <ul>
 *    <li>abc</li>
 *    <li>def</li>
 *    <li>ghi</li>
 *  </ul>
 */
1.1.0

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago