2021 03 29 React Tips
文章目录
React Tips
How to import const from other modules
A good rule is to keep all constants in a separate file, away from all Views.
Try creating a file for all App Constants. Constants.js
is a good choice.
Then put constants in like this:
|
|
Then you can import your constants wherever you need them.
|
|
and use like such
|
|
Issue list
Dropdown component, select componet loading performance issue
Date: 2021-03-30
如果 Azure Blob container文件过多,目录层级过多,用list blob操作,会导致下拉列表载入速度变慢。
写程序需要考虑性能影响。
When read all files from Azure Blob container as dropdown items, setItems using React hook. If there are a lot of files in Azure Blob container, the rendering speed of Select componet is very slow.
It is better replace the Select by a tree view in the page.
|
|
文章作者 Hustbill billyzhang2010@gmail.com
上次更新 2021-03-29