examples/basic-custom-layout/src/index.js
function layoutInit() {
  IBMChat.subscribe('layout:choose', function(data) {
    var widget = new Choose(data);
    widgets[data.uuid] = widget;
  });
  IBMChat.subscribe('layout:confirm', function(data) {
    var widget = new Choose(data);
    widgets[data.uuid] = widget;
  });
}
function layoutInit() {
  IBMChat.subscribe('layout:choose', function(data) {
    var widget = new Choose(data);
    widgets[data.uuid] = widget;
  });
  IBMChat.subscribe('layout:confirm', function(data) {
    var widget = new Choose(data);
    widgets[data.uuid] = widget;
  });
}
function layoutInit ( ) { IBMChat . subscribe ( 'layout:choose' , function ( data ) { var widget = new Choose ( data ) ; widgets [ data . uuid ] = widget ; } ) ; IBMChat . subscribe ( 'layout:confirm' , function ( data ) { var widget = new Choose ( data ) ; widgets [ data . uuid ] = widget ; } ) ; }
our layout's init function. We subscribe to both 'choose' and 'confirm' layout events so this is used to render both.
our layout s init function . We subscribe to both choose and confirm layout events so this is used to render both .