跳至内容
菜单
此问题已终结
1225 查看

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
5月 24
2199
0
7月 25
2
1
6月 24
1459
1
5月 24
1957
1
10月 21
4745