@restart/context

WebJar for @restart/context

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

restart__context
Последняя версия

Последняя версия

2.1.4
Дата

Дата

Тип

Тип

jar
Описание

Описание

@restart/context
WebJar for @restart/context
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/react-restart/context

Скачать restart__context

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/restart__context/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>restart__context</artifactId>
    <version>2.1.4</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/restart__context/
implementation 'org.webjars.npm:restart__context:2.1.4'
// https://jarcasting.com/artifacts/org.webjars.npm/restart__context/
implementation ("org.webjars.npm:restart__context:2.1.4")
'org.webjars.npm:restart__context:jar:2.1.4'
<dependency org="org.webjars.npm" name="restart__context" rev="2.1.4">
  <artifact name="restart__context" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='restart__context', version='2.1.4')
)
libraryDependencies += "org.webjars.npm" % "restart__context" % "2.1.4"
[org.webjars.npm/restart__context "2.1.4"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

@restart/context npm

React context helpers.

Install

npm install @restart/context

Usage

import React from 'react';
import mapContextToProps from '@restart/context/mapContextToProps';

const MyValueContext = React.createContext(null);

function MyComponent(props) {
  /* ... */
}

const MyComponentWithMyValue = mapContextToProps(
  MyValueContext,
  myValue => ({ myValue }),
  MyComponent,
);

const withMyValue = Component =>
  mapContextToProps(
    {
      consumers: MyValueContext,
      mapToProps: myValue => ({ myValue }),
      displayName: `withMyValue(${Component.displayName || Component.name})`,
    },
    Component,
  );
org.webjars.npm
A loose suite of style agnostic components, a11y primitives, and react utilities (icon: https://webkul.github.io/vivid/)

Версии библиотеки

Версия
2.1.4