Write logic for payments/account-setup to send state to its child components
See original GitHub issueIssue Description
Problem
EDIT
This is being broken into tasks and is just being used for reference right now.
We need to be able to send state to child components in the payments/account-setup
component in order to determine whether we should be displaying the forms or instead some success components if the data was valid and we’re done with that step.
This is probably the most complex here and the logic here still needs to be figured out.
We’ll want to add some tasks like:
- create success component for bank-account
- create success component for identity
etc.
Issue Analytics
- State:
- Created 6 years ago
- Comments:28 (28 by maintainers)
Top Results From Across the Web
Passing State of Parent to Child Component as Props
This guide will demonstrate how to make a parent component aware of actions or changes in the child by passing state as props....
Read more >reactjs - How do I pass parent state to its child components?
If you wanna pass the state {name:"helloworld"} do it like that: class App extends React.Component { constuctor(props) { super(props); ...
Read more >Sharing State Between Components - React Docs
Sometimes, you want the state of two components to always change together. To do it, remove state from both of them, move it...
Read more >How to set Parent State from Children Component in ReactJS?
Step 3: Now create Parent and Children components in the src folder with the following code. Filename- Child.js: Javascript. Javascript ...
Read more >how to change the state of parent component from child ...
Hi Team, I have started using the hooks. And come across a scenario where i have to change the state of the parent...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@begedin keep in mind that subcomponents can bypass the parents to send actions with https://github.com/DockYard/ember-route-action-helper
That should clarify 3 top-level components (of which we only need 2, ignoring contact right now) which each have various sub-components potentially, each responsible for their own state depending on their status:
Each component and subcomponent must be responsible for its own states of pending, required, verifying, verified, errored. Thus the logic is simple conditional logic, whereas the bounding component has the same styles (inside a box, e.g.).