In my code I am using external library for rendering table its called antd. I want to re render this imported component when my store state changes but I am unable to make this component observable as its is imported component and it uses data passed as props.
It only worked when I also rendered this store data in main component so it triggered re rendering also this child imported componeent. But don't want to return this data in the main component i want to only return it in the table.
import React from 'react';
import { Table } from 'antd';
@inject('meetingsStore')
@observer
export default class MeetingNotes extends React.Component {
render() {
const meetingsStore = this.props.meetingsStore;
const { agendaPoints } = meetingsStore.getCurrentMeeting();
return (
<Table
rowKey="id"
columns={columns}
dataSource={agendaPoints}
pagination={false}
/>
);
}
}
When I update the store state I want this Table component to re-render.