Open
Description
I have a component which has a class. I have noticed that reloading does not work if a function contained in a component has code which is changed. Example:
class MainApp extends Component
{
constructor(props)
{
super(props);
this.DOM =
{
G : // generator functions
{
contactButton : (p)=>
{
return (
<Button className={this.classes.contactButtonContainer}
onClick={()=> {location.href = p.url}}>
<i className={p.className}/>
</Button>
);
}
}
};
}
render ()
{
return (
<div className="appWrapper">
<div className="mainContent">
<AppHeader/>
<div>- insert body content here -</div>
</div>
<div className="appFooter">
{this.DOM.G.contactButton(
{
className : 'mdi mdi-github-box',
url : 'http://somewhere'
})}
{this.DOM.G.contactButton(
{
className : 'rc3 rc3-npm-box',
url : 'http://somewhere'
})}
{this.DOM.G.contactButton(
{
className : 'mdi mdi-code-tags',
url : 'http://somewhere''
})}
</div>
</div>
);
}
}
If I edit the definition of this.DOM.G.contactButton
, no changes are detected when reloading. Also to note, I am using Redux & ReactRouter (@next/latest for each). I was very careful to set up each and require the proper middleware, but I'm not sure if this is an issue with that at this point.
Metadata
Assignees
Labels
No labels