MCPcopy Create free account
hub / github.com/ctrlplusb/react-injectables / removeInjector

Method removeInjector

src/InjectablesProvider.js:172–185  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

170 }
171
172 removeInjector(args) {
173 const { injectionId, injectorInstance } = args;
174 const registration = this.getRegistration({ injectionId });
175 const injection = this.findInjection({ registration, injectorInstance });
176
177 invariant(
178 !!injection,
179 `Trying to remove an injector which has not been registered`);
180
181 registration.injections = without(injection)(registration.injections);
182 this.runInjections({ registration });
183
184 this.clearRegistrationIfEmpty({ registration });
185 }
186
187 render() {
188 return (

Callers 5

getChildContextMethod · 0.95
vFunction · 0.80
componentWillUnmountMethod · 0.80

Calls 5

getRegistrationMethod · 0.95
findInjectionMethod · 0.95
runInjectionsMethod · 0.95
withoutFunction · 0.90

Tested by

no test coverage detected