Socket
Socket
Sign inDemoInstall

@farfetch/blackout-react

Package Overview
Dependencies
73
Maintainers
1
Versions
430
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @farfetch/blackout-react

React components, hooks and other tools filled with business logic to help you use Farfetch Platform Solutions' services in your web or native e-commerce app


Version published
Weekly downloads
50
Maintainers
1
Created
Weekly downloads
 

Readme

Source

@farfetch/blackout-react

React components, hooks and other tools filled with business logic to help you use Farfetch Platform Solutions' services in your web or native e-commerce app

Installation

yarn

yarn add @farfetch/blackout-react

npm

npm i @farfetch/blackout-react

Peer dependencies

Make sure that you have installed the correct Farfetch's peer dependencies:

  • @farfetch/blackout-core

Usage

You just need to import and use what you need

// Managing a bag item
import { useBagItem } from '@farfetch/blackout-react/bags';

const { error, isLoading } = useBagItem(bagItemId);

Additional configuration

Since this package is published in its original structure, all the source code is contained in a src folder. This means you might need additional configurations:

  • In order to have friendly imports (@farfetch/blackout-react vs @farfetch/blackout-react/src), you probably want to add aliases

    // Webpack example
    config.resolve.alias = {
      '@farfetch/blackout-react': '@farfetch/blackout-react/src',
    };
    
  • In order to have your project running, you probably need a specific loader

    // Webpack example
    config.module.rules.push({
      test: /\.jsx?$/,
      include: [/node_modules\/@farfetch\/blackout-react/],
      use: [
        {
          loader: 'babel-loader',
          options: myBabelConfig,
        },
      ],
    });
    

Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.

Please read the CONTRIBUTING file to know what we expect from your contribution and the guidelines you should follow.

License

MIT @ Farfetch

FAQs

Last updated on 21 Mar 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc