I am new to react and need to add a button to UI, where on button click in component A, firstly on button click, the method in component X will be called which creates a new DB entry and returns ID, and then I need to display that ID in a popup, which means I need to render a new Competent ,say Y, which will display that ID in popup.How can I achieve that?
I know adding a button and making a getting result from component X, but then how can I render them in component Y, since there is no such action associated with Button?