-
Notifications
You must be signed in to change notification settings - Fork 109
Closed
Labels
Description
Currently the following will log I am being rendered.
const MyComponent = React.createClass({render: () =>
console.log('I am being rendered') || <span>content</span>
});
<Collapse isOpened={false}>
<MyComponent />
</Collapse>In case of many initially collapsed elements, it can be a considerable performance penalty to render all collapsed content.
An option could determine if these should be initially rendered.
Although I'm not sure why someone would want to initially render a hidden element.
Alternatively, a solution would be to implement #19 as an option. The following construct would then achieve the wished behavior.
let isOpened = false;
<div>
{ isOpened && <Collapsed isOpened={isOpened} initallyAnimate={true}>content</Collapse>}
</div>Thanks for <Collapase/> btw :-)
Reactions are currently unavailable