2020年12月22日星期二

React modal form, different actions on submit

Recently I started learning React and then I came across a scenario where I need to call a modal created in two other components that are different and need to be submitted with different actions.

In other words, when I call from the first component, I have to perform one action on submit and when I call it from the second component, I have to perform a second action on submission. Should I indicate this during the modal call or do I have to do it differently?

Any help would be appreciated, and examples as well.

https://stackoverflow.com/questions/65412651/react-modal-form-different-actions-on-submit December 23, 2020 at 12:51AM

没有评论:

发表评论