return function(D,E,s)D[E]=function(...)D:setState({State=s})local d=D.props[E]if d then d(...)end end end
return function (self, Event, State)

	self[Event] = function(...)
		
		-- Set state
		self:setState({
			State = State
		})
		
		-- Custom callback
		local Callback = self.props[Event]
		if Callback then
			Callback(...)
		end
	end
end
