
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.
react-coat
Advanced tools
Structured React + Redux with Typescript and support for isomorphic rendering beautifully(SSR)
Click to view the latest document
The opening, freedom and prosperity of react ecosphere also lead to tedious development and configuration and confused choice.Reaction-coat abandons some flexibility, replaces some configurations with conventions, solidifies some best practices, and provides developers with a more concise sugar coat.
Are you still honestly maintaining the store according to the native Redux tutorial?Try react-coat, which is so simple that you can do it almost without learning.
For example:
// Only one class, action、reducer、effect、loading
class ModuleHandlers extends BaseModuleHandlers {
@reducer
protected putCurUser(curUser: CurUser): State {
return {...this.state, curUser};
}
@reducer
public putShowLoginPop(showLoginPop: boolean): State {
return {...this.state, showLoginPop};
}
@effect("login") // use loading state
public async login(payload: {username: string; password: string}) {
const loginResult = await sessionService.api.login(payload);
if (!loginResult.error) {
this.updateState({curUser: loginResult.data});
Toast.success("welcome!");
} else {
alert(loginResult.error.message);
}
}
// uncatched error will dispatch @@framework/ERROR action
// observed it and reporting to the server
@effect(null) // set null that means loading state are not needed
protected async ["@@framework/ERROR"](error: CustomError) {
if (error.code === "401") {
// dispatch action
this.dispatch(this.actions.putShowLoginPop(true));
} else if (error.code === "301" || error.code === "302") {
this.dispatch(this.routerActions.replace(error.detail));
} else {
Toast.fail(error.message);
await settingsService.api.reportError(error);
}
}
// observed itself's INIT Action and to do any async request
@effect()
protected async ["app/INIT"]() {
const [projectConfig, curUser] = await Promise.all([
settingsService.api.getSettings(),
sessionService.api.getCurUser()
]);
this.updateState({
projectConfig,
curUser,
});
}
}
FAQs
Structured React + Redux with Typescript and support for isomorphic rendering beautifully(SSR)
We found that react-coat demonstrated a not healthy version release cadence and project activity because the last version was released 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.