Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Write logic for payments/account-setup to send state to its child components

See original GitHub issue

Issue Description



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


Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:28 (28 by maintainers)

github_iconTop GitHub Comments

joshsmithcommented, Dec 16, 2016

@begedin keep in mind that subcomponents can bypass the parents to send actions with

joshsmithcommented, Dec 16, 2016

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:

  • ~contact (ignored, not MVP)~
  • funds recipient
    • verification_document
    • personal_id_number
  • bank account

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.).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found