콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
6 답글
28032 화면

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?


아바타
취소
베스트 답변

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


아바타
취소
베스트 답변

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

Cheers!!



아바타
취소
베스트 답변

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







아바타
취소
베스트 답변

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

아바타
취소
베스트 답변

I'm also interested on it...

아바타
취소
베스트 답변

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/

아바타
취소

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