-
Notifications
You must be signed in to change notification settings - Fork 24
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
前端 2023-2024 计划 #1439
Labels
Comments
目前的饼
工作计划【学习】第一阶段 9.18 - 10.15
【学习】第二阶段 10.15 - 12.3
【学习】第三阶段 12.3 - 1.7
【开发】第一阶段 3.3 - 3.31
【开发】第二阶段 4.1 - 5.12
【开发】第三阶段 5.13 - 6.30
【尾声】2024.7 - 2024.9
|
代码整理的具体要求流程与方法
参考的文件结构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; |
FranGuam
added
enhancement
New feature or request
good first issue
Good for newcomers
labels
Mar 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
这里是网站组前端小队今年的计划,会根据进度及时调整,请队员们查收~
The text was updated successfully, but these errors were encountered: