I could be wrong here, but from testing, there appears to be a bug in how the static method loadProps is called.
For example, the method won't be called (shown in code below):
export default ({ children }) => (
children || <DefaultPage />
);
class DefaultPage extends Component {
constructor(props) {
super(props);
}
static loadProps(stuff, cb) {
console.log('async props called');
cb(null, {});
}
render() {
return (
<div className="pw__wrapper">
</div>
);
}
}
But in the example below, the method will be called
export default class DefaultPage extends Component {
constructor(props) {
super(props);
}
static loadProps(stuff, cb) {
console.log('async props called');
cb(null, {});
}
render() {
return (
<div className="pw__wrapper">
</div>
);
}
}
Not sure if this intended or not?