
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@actioncrew/actionstack
Advanced tools
Next-generation state management for reactive applications
Built on Streamix for ultimate performance and simplicity
npm install @actioncrew/actionstack
import { createStore, createModule, action, thunk, selector } from '@actioncrew/actionstack';
// Actions with built-in state handlers
const increment = action('increment',
(state: number, payload: number = 1) => state + payload
);
const reset = action('reset', () => 0);
// Create module
const counterModule = createModule({
slice: 'counter',
initialState: 0,
actions: { increment, reset },
selectors: {
count: selector((state: number) => state),
}
});
// Initialize
const store = createStore();
counterModule.init(store);
// Use actions directly
counterModule.actions.increment(5); // Counter: 5
counterModule.actions.reset(); // Counter: 0
// Subscribe to changes
counterModule.data$.count().subscribe(count => {
console.log('Counter:', count);
});
interface TodoState {
todos: Todo[];
loading: boolean;
}
const addTodo = action('add',
(state: TodoState, text: string) => ({
...state,
todos: [...state.todos, { id: Date.now(), text, completed: false }]
})
);
const setTodos = action('setTodos',
(state: TodoState, todos: Todo[]) => ({ ...state, todos, loading: false })
);
const setLoading = action('setLoading',
(state: TodoState, loading: boolean) => ({ ...state, loading })
);
// Thunk using createThunk
const fetchTodos = thunk('fetchTodos', () =>
(dispatch, getState, dependencies) => {
todoModule.actions.setLoading(true);
dependencies.todoService.fetchTodos()
.then(todos => todoModule.actions.setTodos(todos))
.catch(error => {
todoModule.actions.setLoading(false);
console.error('Failed to fetch todos:', error);
});
}
);
// Selectors
const selectActiveTodos = selector(
(state: TodoState) => state.todos.filter(t => !t.completed)
);
// Module with dependencies
const todoModule = createModule({
slice: 'todos',
initialState: { todos: [], loading: false },
actions: { addTodo, setTodos, setLoading, fetchTodos },
selectors: { selectActiveTodos },
dependencies: { todoService: new TodoService() }
});
// Usage
todoModule.init(store);
todoModule.actions.fetchTodos();
// Reactive UI updates
todoModule.data$.selectActiveTodos().subscribe(activeTodos => {
renderTodos(activeTodos);
});
let store = createStore();
store.populate(authModule, uiModule, settingsModule);
// Load modules at runtime
const featureModule = createDashboardModule();
featureModule.init(store);
// Unload when no longer needed and clear state
featureModule.destroy(true);
import { combineLatest, map, filter, eachValueFrom } from '@actioncrew/streamix';
// Combine data from multiple modules
const dashboardData$ = combineLatest([
userModule.data$.selectCurrentUser(),
todoModule.data$.selectActiveTodos(),
notificationModule.data$.selectUnread()
]).pipe(
map(([user, todos, notifications]) => ({
user,
todoCount: todos.length,
hasNotifications: notifications.length > 0
}))
);
// React to combined state changes
for await (const data of eachValueFrom(dashboardData$)) {
updateDashboard(data);
}
const store = createStore({
dispatchSystemActions: true,
awaitStatePropagation: true,
enableGlobalReducers: false,
exclusiveActionProcessing: false
}, applyMiddleware(logger, devtools));
The combination of Streamix's query()
method and ActionStack's thunks creates a uniquely powerful and streamlined approach:
Feature | ActionStack V3 | Redux + RTK | Zustand |
---|---|---|---|
Bundle Size | Minimal | Large | Small |
Reactivity | Built-in | Manual | Manual |
Modules | Native | Manual | Manual |
Type Safety | Excellent | Good | Good |
Async Actions | Native | Thunks | Manual |
Ready for next-gen state management? 🚀
Install from NPM •
View on GitHub
FAQs
Unknown package
We found that @actioncrew/actionstack demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.