L
L
lex2019-01-31 18:00:50
React
lex, 2019-01-31 18:00:50

Subscribing to an event of another react component?

Good afternoon, colleagues!
How to subscribe to another component? even if more precisely on its dispatch?
there are card blocks with an add button, when I click dispatch, I send an action with data and everything works, but I need another component to see it and make some kind of logic of its own. Can this be done without additional data in the shared storage?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Magrian, 2019-01-31
@Magrian

the component-initiator of the event writes something to the store? if so, then we subscribe the second component to changes in that part of the store that changes the first

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question