
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
tailwindapi
Advanced tools
State management as simple as CSS classes. No Redux boilerplate.
npm install tailwindapi
import { StateManager, useStateless } from 'tailwindapi';
// Create a store
const counterStore = new StateManager({
initialState: { count: 0 },
mutations: {
INCREMENT: (state, payload) => {
state.count += payload || 1;
}
}
});
// Use in React component
function Counter() {
const { state, commit } = useStateless(counterStore);
return (
<div>
<p>Count: {state.count}</p>
<button onClick={() => commit('INCREMENT', 1)}>+1</button>
</div>
);
}
The core class that manages your application state.
const store = new StateManager({
initialState: { count: 0, user: null },
mutations: {
INCREMENT: (state, payload) => { state.count += payload || 1; },
SET_USER: (state, user) => { state.user = user; }
},
actions: {
fetchUser: async (state, userId) => {
const user = await api.getUser(userId);
state.user = user;
}
}
});
useStatelessBasic hook for state management.
const { state, commit, dispatch, reset } = useStateless(store);
useAPIHook with built-in loading and error states.
const { state, callAPI, isLoading, error } = useAPI(store);
useSliceSubscribe to a single property for performance.
const [count, setCount] = useSlice(store, 'count');
useMutateSimplified hook for mutations only.
const { mutate, state } = useMutate(store);
mutate('INCREMENT', 5);
withLoggerAdd logging to your store for debugging.
const store = withLogger(new StateManager({...}));
createPersistedStoreCreate a store that persists to localStorage.
const store = createPersistedStore(
{ initialState: {...}, mutations: {...} },
'my-app-state'
);
combineStoresCombine multiple stores into one.
const rootStore = combineStores({
user: userStore,
cart: cartStore
});
See EXAMPLE_USAGE.md for complete examples.
MIT
FAQs
State management as simple as CSS classes. No Redux boilerplate.
We found that tailwindapi 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.