You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
suppose you have a top level component App that maintains the app's data, and a nested component Author that receives information from the top level through its props. Then oninput, it generates an event that notifies the top level component that it needs to change its data.
Would it makes sense to make the AuthorHandler method part of the message payload? It would need to take an input argument authors, and then the methods in App should just be a specification of which authors the method from the message payload should be applied to.
The text was updated successfully, but these errors were encountered:
suppose you have a top level component
App
that maintains the app'sdata
, and a nested componentAuthor
that receives information from the top level through its props. Thenoninput
, it generates an event that notifies the top level component that it needs to change its data.Currently the handler must know about the top level data structure, e.g. https://github.com/jspaaks/cff-initializer-javascript/blob/d5d53e9a362a250998baf10e0a197b159c92c937/src/AuthorHandler.js#L2-L7
which seems to violate the separation into components.
Would it makes sense to make the
AuthorHandler
method part of the message payload? It would need to take an input argumentauthors
, and then themethods
inApp
should just be a specification of whichauthors
the method from the message payload should be applied to.The text was updated successfully, but these errors were encountered: