I'm using the react-rails gem.
Ive written a component SortableTable
that I am trying to extend:
In components/common/sortable_table.jsx
class SortableTable extends React.Component
{
..
}
It works fine in components/staff_dashboard/staff_dashboard_table.jsx
class StaffDashboardTable extends SortableTable {
...
}
but in components/accounting_team_dashboard/accounting_team_dashboard_table.jsx
class AccountingTeamTable extends SortableTable {
...
}
I get the error SortableTable is not defined
.
I read something about exporting the components so I added it:
class SortableTable extends React.Component
{
..
}
export default SortableTable
But this now gives an error: Uncaught ReferenceError: exports is not defined
.
This on gem version 2.2.1, I'm not using web packer. It's really odd to me that it works for the staff table - Maybe because it gets included below SortableTable
?