sorgerlab / CancerBrowser

HMS LINCS Cancer Browser
5 stars 3 forks source link

Restore hot-reloading to dataset landing pages #240

Open pbeshai opened 8 years ago

pbeshai commented 8 years ago

Apparently react's hot reloading plugin statically analyzes the code to decide what it can hot reload. Since in our dataset landing pages they extend DatasetBasePage instead of Component (or React.Component), it thinks it can't hot reload the page.

To restore hot reloading, it should be as simple as changing the base class name locally, e.g. in DatasetReceptorProfilePage, change:

/**
 * React container for a dataset page page - Receptor Profile
 */
class DatasetReceptorProfilePage extends DatasetBasePage {

to

const Component = DatasetBasePage; // React hot-reloading fix
/**
 * React container for a dataset page page - Receptor Profile
 */
class DatasetReceptorProfilePage extends Component {