New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

kea

Package Overview
Dependencies
Maintainers
1
Versions
233
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kea - npm Package Versions

13
24

3.0.1

Diff

Changelog

Source

3.0.1 - 2022-05-19

  • Remove incorrect peerDependencies from package.json
mariusandra
published 3.0.0 •

Changelog

Source

3.0.0 - 2022-05-12

  • Read more here: https://keajs.org/blog/kea-3.0
mariusandra
published 3.0.0-beta.6 •

mariusandra
published 3.0.0-beta.5 •

mariusandra
published 3.0.0-beta.4 •

mariusandra
published 3.0.0-beta.3 •

mariusandra
published 3.0.0-beta.2 •

mariusandra
published 3.0.0-beta.1 •

mariusandra
published 3.0.0-beta.0 •

mariusandra
published 2.6.0 •

Changelog

Source

2.6.0 - 2022-05-06

  • Update version requirements of peer dependencies: reselect 4.1+, redux 4.2+, react-redux 7+ and react 16.8+.

  • If you're using React 18, upgrade react-redux to version 8+.

  • Add a "redux listener silencing store enhancer", which prevents Redux's useSelectors from updating, when mounting a logic from within the body of a React component (e.g. with useValues). This effectively silences log spam in React 18 (Warning: Cannot update a component (Y) while rendering a different component (X). To locate the bad setState() call inside X, follow the stack trace as described.), and improves performance.

  • Set the autoConnectMountWarning option to true by default. Kea 2.0 introduced "auto-connect", and while it works great in reducers and selectors, automatically connecting logic in listeners turned out to be a bad idea. Thus, in Kea 2.6, when accessing values on an unmounted logic, you'll get a warning by default. In Kea 3.0, it will trigger an error.

import { kea } from 'kea'
import { otherLogic } from './otherLogic'
import { yetAnotherLogic } from './yetAnotherLogic'

const logic = kea({
  // connect: [otherLogic], // should have been explicitly connected like this, or mounted outside the logic
  actions: { doSomething: true },
  listeners: {
    doSomething: () => {
      // This will now print a warning if `otherLogic` is not mounted.
      console.log(otherLogic.values.situation)
    },
  },
  reducers: {
    something: [
      null,
      {
        // This `yetAnotherLogic` will still get connected automatically, not print a warning,
        // and not require `connect`. That's because it's connected directly at build time, whereas
        // in the listener, we're running within an asynchronous callback coming from who knows where.
        // While this works, it's still good practice to explicitly define your dependencies.
        [yetAnotherLogic.actionTypes.loadSessions]: () => 'yes',
      },
    ],
  },
})
  • Support custom selector memoization. Use memoizeOptions as the 4th selector array value, which is then passed directly to reselect:
const logic = kea({
  selectors: {
    widgetKeys: [
      (selectors) => [selectors.widgets],
      (widgets) => Object.keys(widgets),
      null, // PropTypes, will be removed in Kea 3.0
      { resultEqualityCheck: deepEqual },
    ],
  },
})
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