Preview functionality works only when the preview(<Component/>) is called from the file that is imported as a part of the application. Otherwise "open preview" button still appears on top of it but does not work due to component not being registered in AppRegistry.
examples:
not imported:
imported:
Additional context:
Currently the preview function is defined in lib/preview.js file and is injected into aplication node_modules by lib/babel_transformer.js file.
When you click "open preview" the function that is most important is defined in lib/warpper.js and is called openPreview.
Preview functionality works only when the
preview(<Component/>)
is called from the file that is imported as a part of the application. Otherwise "open preview" button still appears on top of it but does not work due to component not being registered in AppRegistry.examples: not imported:
imported:
Additional context: Currently the preview function is defined in lib/preview.js file and is injected into aplication node_modules by lib/babel_transformer.js file. When you click "open preview" the function that is most important is defined in lib/warpper.js and is called openPreview.