Instead of gracefully returning an error code to the parent application, I print the error to the screen and bail out of the code.
我没有按通常作法将错误代码返回给父代应用程序,而是将错误打印到屏幕,然后退出程序。
The example in Listing 7 demonstrates how a parent at any level in the application can control the state of its child component.
清单 7 中的示例演示了一个任意级别的父程序如何控制其子组件的状态。
应用推荐