I have defined a context Transaction which takes an object and a function. In AppProvider Transaction.Provider is returned