If a.js and b.js import each other, what will be the impact?

a.js

import B from "./b"
const b = new B()
console.log(b)

export default class A {
    testa = "aaa"
}

b.js

import A from "./a"
const a = new A()
console.log(a)

export default class B {
    testb = "bbb"
}
Mar.12,2022

Loop loading


Yes, it is not available to refer to each other, otherwise it will cause repeated references to report errors, so when developing, the structure should be clear


es6 will form a recursive

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e65182-4d205.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e65182-4d205.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?