Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use react with @spartacus framework?

My question is, can I use the react framework with @spartacus storefront? this is because our frontend application is developed in React and we want to use @Spartacus storefront to leverage advantages like decoupling front-end and Hybris build ..etc. but as it is developed on angular I am not sure whether it supports other frameworks like React within it.

like image 857
Chiru P Avatar asked Dec 02 '19 18:12

Chiru P


2 Answers

There is some effort in making possible using web components as cms components, so you could use any technology to author them (including React), but it's still in the experimental phase (but works already).

More info is available in the docs: https://sap.github.io/cloud-commerce-spartacus-storefront-docs/customizing-cms-components/#using-web-components-as-cms-components-experimental-support

And here you can find some example POCs for React, Vue, and Svelte:

  • https://github.com/dunqan/react-cms-web-component
  • https://github.com/dunqan/vue-cms-web-component
  • https://github.com/dunqan/svelte-cms-web-component
like image 175
dunqan Avatar answered Sep 22 '22 02:09

dunqan


Spartacus needs Angular. So, I would say "NO", unless you want the complexity of integrating Angular with React.

like image 35
geffchang Avatar answered Sep 22 '22 02:09

geffchang