Is Ceres theme Apply on Exisitng React js Project
Is the Ceres theme applicable to existing React JS projects? If yes, then how will I apply for my project?
Replies (1)
Hi,
Sorry for the late reply.
Unfortunately, at the moment Ceres doesn't have a React version out of the box.
You can apply Ceres theme to your existing React project, by following the steps below:
- Including the mandatory theme files globally:
CSS files:
/assets/plugins/global/plugins.bundle.css
/assets/css/style.bundle.css
Javascript files:
/assets/plugins/global/plugins.bundle.js
/assets/js/scripts.bundle.js - In our HTML version, our components are initialized within the
loadevent. However, in SPA versions, content is rendered differently, and to use our JavaScript components, you'll need to move the initialization from theloadevent to theuseEffecthook.
All components in HTML version are initialized in js/components/_init.js, you can move this initialization intouseEffectas shown below:
useEffect(() => {
KTComponents.init();
}); - Copy HTML markup from our HTML version to your React components.
By following the steps above you will have a basic theme core. Keep in mind that separate pages might require additional Javascript and CSS files to be loaded.
Regards,
Lauris Stepanovs,
Keenthemes Support Team