You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Anyway under typescript the example actually becomes:
import * as ReactHabitat from 'react-habitat';
import { Hello } from './components/Hello';
class MyApp extends ReactHabitat.default.Bootstrapper {
constructor(){
super();
// Create a new container builder
var container = new ReactHabitat.default.Container();
// Register your top level component(s) (ie mini/child apps)
container.register('Hello', Hello);
// Finally, set the container
this.setContainer(container);
}
}
// Always export a 'new' instance so it immediately evokes
export default new MyApp();
Note the lookup: ReactHabitat.default.Bootstrapper and ReactHabitat.default.Container()
The text was updated successfully, but these errors were encountered:
So Babel does some magic with
export default
you can see how it conflicts here:microsoft/TypeScript#5565 (comment)
Supposedly this is being addressed?
babel/babel#2212
Anyway under typescript the example actually becomes:
Note the lookup:
ReactHabitat.default.Bootstrapper
andReactHabitat.default.Container()
The text was updated successfully, but these errors were encountered: