January 2020
Intermediate to advanced
530 pages
11h 11m
English
The container component has a fairly straightforward logic. It accepts the current state of the app from the app.js file. It checks the current value of the account state variable to see whether its value is not null, indicating the customer has successfully logged in to the app. If the value is null, the container renders the AppLogin.js component so that the user can log in.
If the account variable is not null, the container component next checks the ViewFlag state variable. If ViewFlag is set to 1, it indicates that the Transfer.js component needs to be rendered. If ViewFlag is set to 2, it indicates that the ViewTransactions.js component needs to be rendered.
Depending on the value of the ViewFlag state ...
Read now
Unlock full access