This repository was archived by the owner on Jan 16, 2018. It is now read-only.
This repository was archived by the owner on Jan 16, 2018. It is now read-only.
Initialization events? (metal-jsx) #151
Open
Description
Is it even possible to listen for initialization events? Currently the only way to listen for these events would be to access the ref of the component, but by the time we have access to the ref I think the component will have already fired this event.
For example:
import Component, {Config} from 'metal-jsx';
import {BarChart, PieChart} from 'metal-charts';
class MyComponent extends Component {
attched() {
this.refs.chart.on('chartInit', () => {
// This will never actually fire
console.log('fire');
});
}
render() {
return (
<PieChart ref="chart" />
);
}
}
export default MyComponent;
I am trying to add something like https://jsbin.com/boyusuz/3/edit?html,js,output
Metadata
Metadata
Assignees
Labels
No labels