s-ol’s avatars-ol’s Twitter Archive—№ 1,341

    1. another #reactjs helper (copy&paste below), this time for consuming multiple contexts and forwarding them as named properties:
      oh my god twitter doesn’t include alt text from images in their API
  1. …in reply to @S0lll0s
    const consumeMultiple = (WrappedComponent, contexts) => contexts.reduce( (inner, [name, Context]) => (args) => ( <Context.Consumer> {value => inner({ ...args, [name]: value })} </Context.Consumer> ), (args => <WrappedComponent {...args} />) );