МТ
Size: a a a
МТ
PM
// module1.js
export const config = {
foo: 1, bar: 2, baz: 3
};
export function func() {
console.log('config', config);
}
// module2.js
import { config, func } from './module1.js';
config.foo = 10;
func(); // { foo: 10, bar: 2, baz: 2}
A
КС
A
// module1.js
export const config = {
foo: 1, bar: 2, baz: 3
};
export function func() {
console.log('config', config);
}
// module2.js
import { config, func } from './module1.js';
config.foo = 10;
func(); // { foo: 10, bar: 2, baz: 2}
МТ
PM
PM
A
КС
МТ
КС
<Component someLongPropsNameForWhateverReason={data} />
PM
A
A
МТ
МТ
PM
PM
A