小编Tri*_*rue的帖子

有没有办法使用本地文件离线运行 create-react-app ?

我们的公司安全策略设置为开发人员需要使用单独的帐户来运行非白名单程序,但这些帐户无法访问互联网,因此当我尝试运行 create-react-app 时,它无法下载任何文件。

是否可以使用我可以访问互联网的普通帐户预先下载必要的文件,然后使用这些文件离线运行 create-react-app ?

reactjs create-react-app

5
推荐指数
1
解决办法
2937
查看次数

我对异步/等待的理解是否正确?

根据我的理解,下面的代码最终应该classification在运行其他代码时检索字符串.

[HttpPost]
public async Task<ActionResult> CreatePropertyAsync(Property property)
{
    string classification = GetClassification(property);
    // GetClassification() runs a complex calculation but we don't need 
    // the result right away so the code can do other things here related to property

    // ... code removed for brevity

    property.ClassificationCode = await classification;
    // all other code has been completed and we now need the classification

    db.Properties.Add(property);
    db.SaveChanges();
    return RedirectToAction("Details", new { id = property.UPRN });
}

public string GetClassification(Property property)
{
    // …
Run Code Online (Sandbox Code Playgroud)

c# asp.net asp.net-mvc asynchronous async-await

0
推荐指数
1
解决办法
136
查看次数