Summary: As part of an ongoing effort to migrate Flipper plugins to new Sandy arch, this diff aims to help by migrating the 'Sandbox' Plugin. Most of the changes were straightforward, as in, could be done by following this excellent migration guide : https://www.internalfb.com/intern/staticdocs/flipper/docs/extending/sandy-migration/ Only thing which caused few issues was the "onready" behaviour. In the old pattern, the 'init' method used to get executed on every render. So it was ok to check for "isconnected" prop there. Now the 'plugin' method is only executed once => and since the device might not be connected then, the "onReady" method (which is equivalent to old 'init' method) didn't work. To fix this => the init method has been replace with "onConnect". Reviewed By: lblasa Differential Revision: D36284538 fbshipit-source-id: 4b2bf74c6d11625e4bd784fbb29fd270158a41ff
3.7 KiB
3.7 KiB