npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@effector/redux-devtools-adapter

v0.2.0

Published

Simple adapter to connect Effector's Inspect API to Redux DevTools

Downloads

9,426

Readme

redux-devtools-adapter

Simple adapter to connect Effector's Inspect API to Redux DevTools, extracted from the old effector-logger project.

Installation

yarn add -D @effector/redux-devtools-adapter

Usage

Prepare metadata

To make logs more useful we need additional metadata (like names, locations in the code, etc), which is provided by one of the effector plugins.

Babel-plugin

Babel-plugin is built-in in the effector package.

Just add it to your babel configuration.

{
  "plugins": ["effector/babel-plugin"]
}

It is also useful to enable loc generation for dev environment, to see for exact locations of samples and other operators in the code.

{
  "plugins": [["effector/babel-plugin", { "addLoc": true }]]
}

Read the docs

SWC Plugin

Read effector SWC plugin documentation

In the code

Just call attachReduxDevTools() somewhere in your project's entrypoint and you are good to go.

// e.g. src/main.ts
import { attachReduxDevTools } from "@effector/redux-devtools-adapter";

attachReduxDevTools();

You can also provide some additional configuration. All fields are optional.

name

Type: string. Will be visible in the Redux Devtools

scope

Type: Scope Effector's Scope from Fork API, if your app uses it.

See the docs and the article

trace

Type: boolean Enables traces of effector's calculations in the actions. Disabled by default.

batch

Type: boolean | { size: number; latency: number; }. Enables batching of logs at the adapter's side. Redux DevTools are trying to print each and every log they get, which may cause performance issues in the large apps.

With batching enabled adapter sends logs only once in latency milliseconds and with number of logs no more than size number. This means that only last size number of logs will be visible in the DevTools at all times.

Enabled by default, defautls are: last 100 logs with latency 500 milliseconds.

stateTab

Type: boolean. Enables state tab with state of all stores at each point in time. May cause performance issues in the large apps. Disabled by default.

devToolsConfig

Config for Redux DevTools, passed directly to the connect call. See the official docs.

Example of configurated call:

import { attachReduxDevTools } from "@effector/redux-devtools-adapter";

attachReduxDevTools({
  name: "My App",
  scope,
  trace: true,
});

In the Next.js - Pages Router

Read effector/next documentation

In the Next.js - App Router

Read effector/next documentation

Release process

  1. Check out the draft release.
  2. All PRs should have correct labels and useful titles. You can review available labels here.
  3. Update labels for PRs and titles, next manually run the release drafter action to regenerate the draft release.
  4. Review the new version and press "Publish"
  5. If required check "Create discussion for this release"