I would like to know:
- How to create react components dynamically, for example from some simple objects.
Can the dynamic creation works also in JSX?
Does react offer a way to retrieve a component after has been created? For example by its id others meanings?
If you could provide me a minimalist working example I really appreciate it thanks!
var data = [{
type: 'button',
props: {
className: 'button button-blue',
children: {
type: 'b',
props: {
children: 'OK!'
}
}
}
},{
type: 'button',
props: {
className: 'button button-blue',
children: {
type: 'b',
props: {
children: 'OK!'
}
}
}
}
];