ies-snippets README
React Snippets 的基本集合
- rbase react base template
import React from "react";
type TProps = {};
export const T: React.FC<TProps> = (props) => {
return <div></div>;
};
- rfc react function components
type TProps = {};
const T: React.FC<TProps> = (props) => {
return <div></div>;
};
import { BaseContext, transferable } from "@ies/ic-common-subject-context";
type State = {};
@transferable
export class Context extends BaseContext<State> {
constructor() {
super({});
}
setState(state: Partial<State>) {
this.dispatch({
...state,
});
}
}
| |