How to use the @talend/react-cmf.bootstrap function in @talend/react-cmf

To help you get started, we’ve selected a few @talend/react-cmf examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Talend / ui / packages / containers / sandbox / src / app / index.js View on Github external
/**
 * This will register all containers in the CMF registry
 */
registerAllContainers();

/**
 * Initialize CMF
 * This will:
 * - Register your components in the CMF registry
 * - Register your action creators in CMF registry
 * - Setup redux store using reducer
 * - Fetch the settings
 * - render react-dom in the dom 'app' element
 */

cmf.bootstrap({
	components: Object.assign({ ComponentForm }),
	settingsURL: '/settings.json',
	actionCreators: actions,
	middlewares: [createLogger({})],
});
github Talend / component-runtime / component-tools-webapp / src / main / frontend / src / index.js View on Github external
import 'brace/mode/java';
import 'brace/mode/python';
import 'brace/mode/sql';
import 'brace/mode/xml';
import 'brace/snippets/java';
import 'brace/snippets/sql';
import 'brace/snippets/python';
import 'brace/snippets/xml';

import i18n from './i18n';

import components from './components';
import ComponentForm from '@talend/react-containers/lib/ComponentForm';
import reducer from './store/reducers';

cmf.bootstrap({
  components: { ComponentForm, ...components },
  reducer,
  appId: 'component-kit-tools-webapp',
  RootComponent: components.App,
});
github Talend / ui / packages / generator / generators / app / templates / src / app / index.js View on Github external
import 'focus-visible';
import cmf from '@talend/react-cmf';
import modules from './services/modules';
import App from './components/App';
import './index.css';

/**
 * Initialize CMF
 * This will:
 * - Setup redux store using reducer
 * - render react-dom in the dom 'app' element
 * API: https://github.com/Talend/ui/blob/master/packages/cmf/src/bootstrap.md
 */
cmf.bootstrap({
	modules,
	RootComponent: App,
});
github Talend / ui / packages / generator / generators / react-cmf / templates / src / app / index.js View on Github external
/**
 * Init the router module
 */
const router = getRouter();

/**
 * Initialize CMF
 * This will:
 * - Register your components in the CMF registry
 * - Register your action creators in CMF registry
 * - Setup redux store using reducer
 * - Fetch the settings
 * - render react-dom in the dom 'app' element
 * API: https://github.com/Talend/ui/blob/master/packages/cmf/src/bootstrap.md
 */
cmf.bootstrap({
	actionCreators,
	components,
	expressions,
	reducer,
	saga,
	sagas,
	settingsURL: '/settings.json',
	AppLoader: 'AppLoader',
	modules: [router.cmfModule],
	RootComponent: router.RootComponent,
});