Я пытался понять Реакт через React library, но не мог понять, что такое context
и updater
, что передается компоненту.
Ниже был код в библиотеке.
function Component(props, context, updater) {
this.props = props;
this.context = context;
this.refs = emptyObject;
// We initialize the default updater but the real one gets injected by the
// renderer.
this.updater = updater || ReactNoopUpdateQueue;
}
Могу ли я получить подробное объяснение? Огромное спасибо.