Jeremy Zheng 57f77f547e :construction: add react form & intl demo 3 anni fa
..
README.md 57f77f547e :construction: add react form & intl demo 3 anni fa
bind.png 91188407e4 :memo: add react day 1 tutorial 3 anni fa
css-in-js.png 91188407e4 :memo: add react day 1 tutorial 3 anni fa
import-order.png 91188407e4 :memo: add react day 1 tutorial 3 anni fa
layout.png 91188407e4 :memo: add react day 1 tutorial 3 anni fa
link-params.png 91188407e4 :memo: add react day 1 tutorial 3 anni fa
namespace.png 91188407e4 :memo: add react day 1 tutorial 3 anni fa
page.png 91188407e4 :memo: add react day 1 tutorial 3 anni fa
route-params.png 91188407e4 :memo: add react day 1 tutorial 3 anni fa

README.md

router, link and layout

开发规范

  • 禁止私自引入第三方的 css
  • 所有第三方的 css 放进App.css
  • 所有的本地 css 采用 css in js 的写法

css in js

  • import 按照第三方js, 本地js顺序

import order

  • 组件放components下, 页面放pages下,以project id区分

namespace

练习参考

layout

  • layout 例子(layouts/anonymous/index.tsx)

layout

  • 页面例子(nut/users/sign-in.tsx)

page

  • 绑定页面和 layout(Router.tsx)

bind

route

  • 从 path 拿参数

    • route 绑定 route params
    • page 中获取

    link params

页面跳转 参见(layouts/anonymous/index.tsx)

作业

  • 每人把自己负责的子项目的所有 pages, components 规划一下 并写出 demo(<div> bla </div>即可)
    • 参见pages/nut/users/sign-in.tsx创建PROJECT_ID/blaA/blaB.tsx页面 对应页面路径/my/PROJECT_ID/blaA/blaB
    • 参见components/nut/users/change-password.tsx创建PROJECT_ID/blaX/blaY.tsx组件
    • 参见Routes.tsx 绑定路径和页面
  • 需要从 http url 中取参数的页面,要写好 params 并验证