Skip to Content
Menu
This question has been flagged
6 Replies
27559 Views

Hi,

I am building some pages and believes react.js suites well for that task. 

Can someone tell me if it is possible to integrate react.js inside odoo and how is your feedback if done already?


Avatar
Discard
Best Answer

In odoo 12:
Yes, it is possible to add react js with odoo. Achieved it by using webpack concepts bundle the particular library and injected in your assets.

Reference example image link:

https://imgur.com/a/JC9SpyI


Avatar
Discard
Best Answer

Hello guys, any updates on this topic? It would be cool if some sort of tutorial on how to achieve this was available. 

Cheers!!



Avatar
Discard
Best Answer

Hello Olivier,

Odoo does not directly support react.js library but you can integrate it by loading its library through the Odoo's assets bundle. After adding it in the Odoo bundle you can import this in the javascript file same as any other javascript file.

If you are using Non-standard JavaScript syntax such as JSX then you need a transcompiler like babel to convert it into normal JavaScript.

Alternatively, we've built some Odoo headless eCommerce components separately with Next.JS.
For more details on this, you can check our blog here >> https://webkul.com/blog/how-to-create-product-page-using-odoo-api-in-nextjs/ .

Incase of any further queries, you can reach us at support@webkul.com 

Thanks & Regards
Webkul Team







Avatar
Discard
Best Answer

For using Odoo with React.js / Next.js you can use the same modules we maintain for Vuestorefront (Nuxt.js / Vue.js) they are open source github at /odoogap/vuestorefront/tree/16.0

Avatar
Discard
Best Answer

I'm also interested on it...

Avatar
Discard
Best Answer

React Js is basically javascript. So yes, you can include ReactJs in Odoo's web asset bundle just like any normal javascript file. Unless you use JSX to write your javascript app, you may need to either transpile it manually or customize the web bundler. You can find out more details in this post https://beolla.com/create-react-ui-odoo/

Avatar
Discard

Excellent, I followed the indications and managed to integrate Odoo (10 and 16) with React. Thanks