8

Does anyone have experience using ReactJS when making a custom Magento template? Or does anyone know if it is viable?

I would like to leverage ReactJS to make a single-page website.

5
  • What are you trying to achieve? Magento two has 2 JS templating libraries included in core, underscore.js and knockout.js. Why do you need react? Commented Aug 12, 2016 at 22:19
  • 1
    Most of the team is experienced with React and React Native so they would like to use those resources
    – Nikkawat
    Commented Aug 15, 2016 at 17:08
  • Just because Magento use it it doesn't mean it's the best choice, React is much better than KO in many areas (performance, community etc.)
    – Ben Crook
    Commented Aug 30, 2017 at 12:36
  • @Josh The problem with the M2 iJS stack is that it's horribly outdated. Commented Aug 30, 2017 at 13:22
  • Totally agree, the frontend architecture in M2 is very outdated. Don't blame you for wanting to layer in React. But I'd consider the time investment in doing so. If you are trying to accomplish something small it may not be worth the time investment when the same features can be accomplished with native M2 JS processes Commented Aug 31, 2017 at 14:04

1 Answer 1

3

Your best bet for this will be to use the Rest API. In this way you can have a completely separate frontend with server rendered pages (read: node) and single page app etc.

I'm surprised there isn't a popular github for such a project by now!

6
  • 1
    There is one gaining some traction although it isn't finished yet and isn't open source from what I can remember - front-commerce.com
    – Ben Crook
    Commented Aug 30, 2017 at 12:40
  • The architecture seems a bit strange, but the demo looks promising, very fast. Commented Aug 30, 2017 at 13:21
  • Yeah I was really impressed with the speed, will be interesting to see it in the wild and check if it's still as fast.
    – Ben Crook
    Commented Aug 30, 2017 at 13:24
  • 1
    At least M2 has a strong API, it could be their saving grace. Commented Aug 30, 2017 at 13:25
  • From what I've seen so far, popular projects for custom JS-based view tend to use Vue.js instead of ReactJS Commented Nov 4, 2017 at 23:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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