Socket
Socket
Sign inDemoInstall

@blockle/react-redux

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blockle/react-redux

ReactRedux hooks


Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

@blockle/react-redux

Drop in replacemenet for react-redux when only using hooks.

Install

yarn add @blockle/react-redux

Usage

import React from 'react';
import { Store } from 'redux';

interface Props {
  children: React.ReactNode;
  store: Store;
}

const AppShell = ({ children }) => {
  return (
    <Provider store={store}>
      {children}
    </Provider>
  );
}

const MyComponent = () => {
  const dispatch = useDispatch();
  const item = useSelector((state) => state.userName);

  return (
    <div>
      {userName}

      <button onClick={() => dispatch(randomizeName())}>
        Randomize name
      </button>
    </div>
  )
}


FAQs

Package last updated on 16 Feb 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc