-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
网站组 2024-2025计划 #1862
Labels
Comments
youyc22
added
enhancement
New feature or request
good first issue
Good for newcomers
and removed
good first issue
Good for newcomers
labels
Jun 3, 2024
前端工作计划第一次部会(9.22)
第二次部会(9.29)
|
代码整理的具体要求流程与方法
参考的文件结构import X from XXX;
/* ---------------- 接口和类型定义 ---------------- */
interface XXXProps {
mode: String;
}
/* ---------------- 不随渲染刷新的常量和组件 ---------------- */
const Container = ({mode}) => styled.div`
color: ${mode}
`;
/* ---------------- 主页面 ---------------- */
const XXXPage: React.FC<XXXProps> = ({mode}) => {
/* ---------------- States 和引入的 Hooks ---------------- */
const [mode, setMode] = useState("black");
const url = useUrl();
/* ---------------- 从数据库获取数据的 Hooks ---------------- */
const {data, error} = useXXXSuspenseQuery({
variables: {
key: value;
}
});
/* ---------------- useEffect ---------------- */
useEffect(() => console.log(error), [error]);
/* ---------------- 业务逻辑函数 ---------------- */
const handleUpload = (file: XXX) => {
return uploadFile(file);
};
/* ---------------- 随渲染刷新的组件 ---------------- */
const Content = () => {
if (mode === "black") return <Button onClick={handleUpload} />;
else return "This is empty.";
};
/* ---------------- 页面组件 ---------------- */
return (
<Container mode={mode}>
<Content />
</Container>
);
}
export default XXXPage; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
饼(持续更新)
重要基础功能修复
UI
优化用户注册相关拓展
Github
账户微信
账户赛事相关功能拓展
信息更新
搜索引擎优化(SEO)
Overleaf维护
课程评测和资源分享
More...
The text was updated successfully, but these errors were encountered: