How to use the @talend/react-cmf.registerInternals 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 / data-prep / dataprep-webapp / src / app / configure.cmf.js View on Github external
...additionalReducers,
			};
		}

		const sagaMiddleware = createSagaMiddleware();
		const middlewares = [sagaMiddleware];
		const additionalMiddlewares = additionalConfiguration.middlewares;
		if (additionalMiddlewares) {
			middlewares.push(...additionalMiddlewares);
		}

		const store = cmfStore.initialize(reducers, initialState, undefined, middlewares);

		sagaMiddleware.run(rootSaga);

		api.registerInternals();

		/**
		 * Register route functions
		 */
		const additionalRouteFunctions = additionalConfiguration.routeFunctions;
		if (additionalRouteFunctions) {
			Object.keys(additionalRouteFunctions).map(k =>
				registerRouteFunction(k, additionalRouteFunctions[k]),
			);
		}

		registerAllContainers();

		dataset.configure();

		/**
github Talend / ui / packages / storybook-cmf / src / CMFStory / CMFStory.component.js View on Github external
super(props);
		let state;
		if (props) {
			state = props.state;
		}
		if (!state) {
			state = mock.state();
		}

		let middlewares = this.props.middleware;
		if (props.sagaMiddleware) {
			middlewares = middlewares.concat([props.sagaMiddleware]);
		}
		this.store = store.initialize(props.reducer, state, props.enhancer, middlewares);
		if (props.sagaMiddleware) {
			api.registerInternals();
			props.sagaMiddleware.run(initSagaMiddleWare);
		}
	}
github Talend / data-prep / dataprep-webapp / src / app / configure.cmf.js View on Github external
...additionalReducers,
		};
	}

	const sagaMiddleware = createSagaMiddleware();
	const middlewares = [sagaMiddleware];
	const additionalMiddlewares = additionalConfiguration.middlewares;
	if (additionalMiddlewares) {
		middlewares.push(...additionalMiddlewares);
	}

	const store = cmfStore.initialize(reducers, preloadedState, undefined, middlewares);

	sagaMiddleware.run(rootSaga);

	api.registerInternals();

	/**
	 * Register route functions
	 */
	const additionalRouteFunctions = additionalConfiguration.routeFunctions;
	if (additionalRouteFunctions) {
		Object.keys(additionalRouteFunctions).map(k =>
			registerRouteFunction(k, additionalRouteFunctions[k]),
		);
	}

	registerAllContainers();

	dataset.configure();

	/**