تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1558 أدوات العرض

I am trying to follow owl tutorial from odoo17 documentation. i am getting an error in console which is this. 
TypeError: Cannot read properties of undefined (reading 'defaultProps')
even though i have copy pasted the code from documentation. here is the playground.js code. 
/** @odoo-module **/

import { Component, useState } from "@odoo/owl";

export class Counter extends Component { static template = "awesome_owl.Counter";

setup() { this.state = useState({ value: 0 }); }

increment() { this.state.value++; }}
here is the code for playground.xml. 

Counter:


what is wrong with the code. ? how to solve the error. 
الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
مايو 24
2586
0
يوليو 25
3
1
يونيو 24
1777
1
مايو 24
2325
1
أكتوبر 21
5059