2

it Is it possible to integrate magento 1.9.x with lib React.JS? because I read about it but most of post says about magento 2.

2

This is less of an answer and more of a point of view.

With Magento 2, the framework is heavy based around a robust API system that allows you to work with a "headless" application. This opens up the possibility to run the framework with what ever presentation layer you want and not loose any functionality. Read more about this idea here: Magento 2 as a headless solution

This is much harder to achieve with Magento 1, as the API system is much less robust. It's still possible, but would be a lot of work. Magento 1 also has a older JS system in place that would result in small little bugs that you would have to chance around the system. In concept, you can place any JS library or framework in M1 that you want. I worked on a site that was using Angular JS for a lot of it's functionality. But in truth, they hadn't built anything that jQuery couldn't have done on it's own.

Also, M1 is closer to end of life. So as you do more digging, you might find few resources that would help as most people wouldn't want to spend their time working on a solution that might only have a shelf life of a few years at best.

It's not a bad idea, especially if you are well versed and both React and Magento, but it would definitely be a challenge.

1

Basicly Yes. Depending if you only want to use it for parts of the Page, or if you want to have the whole Page with React, you need to put some work to create additional API endpoints.

But: as you have neither much experience with Magento, neither with React, I strongly advice against it. Even for an experienced Programmer thats still the work of several Months. An Ecommerce system is complex, dont put lighthearted even more complexity into it.

For Magento1 you may have more luck to use this preexisting solution: https://www.vuestorefront.io/ which is using Vue instead of React. But even this should only be used, if you have a certain base knowledge about Magento.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.