Building highly reusable React.js components using compound pattern