occ-shared-resource-bundles
occ-react-component
React Based Solution for Oracle Commerce Cloud
This is a working proof-of-concept, "quasi-headless" React Redux Solution for Oracle Commerce Cloud. Using the Admin / Design View, you can create React based Web Content using custom React elements. Full design-view layouts are preserved.
The solution wraps the knockout.js view model with Redux and injects both the model and dependencies into each React component allowing developers access to best of both worlds, "old" and new.
Install the dependencies
npm i
dev build
npm run build:dev
prod build
npm run build:prod
watcher
npm run watch
Because the OCC Admin extension linter will prevent non Require,js files from being uploaded, you will need to install the widget only the bundle.js first, and then use the DCU to install your remaining bundles, adding additional ones as they are created.
Add all OCC Require.js AMD OCC modules dependencies required for your app in componentConfig.js These will be shimmed and made available at runtime to your application.
Main OCC widget entry file. This is the react equivalent to the main OCC widget file
React component will compile to this folder preserving the normal widget structure. Add normal localized resource files here. The "/file" is needed to preserve the path strructure on the OCC server.
Webpack depending on how you split your bundles(dynamic imports) will create several files.
OCC representations for your React widgets and elements. Use and install these to position your React components in the design view.
If you would like to use standalone React components in your current UI, check out occ-react-component
Thanks to @btholt for the React starter
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.