Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1261 Lượt xem

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. 
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 5 24
2230
0
thg 7 25
2
1
thg 6 24
1510
1
thg 5 24
2011
1
thg 10 21
4804