Inside src/context/userContext
, we are using a wrapper component
which supplies(using a context) an object which has a key "greeting" set to "Hello" to Home
component.
What we need to implement is a function changeGreeting
which is passed along with greeting property in context
which triggers when we type inside Setttings
component.
So by default input is empty in Settings component and inside home "greeting" is set to default "Hello" but when we start typing it changes to whatever is being typed in settings component as we type.