function Component.__getContext(d,s)if config.internalTypeChecks then internalAssert(Type.of(d)==Type.StatefulComponentInstance,"\073\110\118\097\108\105\100 \117\115\101 \111\102 \096\095\095\103\101\116\067\111\110\116\101\120\116\096")internalAssert(s~=nil,"\067\111\110\116\101\120\116 \107\101\121 \099\097\110\110\111\116 \098\101 \110\105\108")end local h=d[InternalData].virtualNode local F=h.context return F[s]end
--[[
	Retrieves the context value corresponding to the given key. Can return nil
	if a requested context key is not present
]]
function Component:__getContext(key)
	if config.internalTypeChecks then
		internalAssert(Type.of(self) == Type.StatefulComponentInstance, "Invalid use of `__getContext`")
		internalAssert(key ~= nil, "Context key cannot be nil")
	end

	local virtualNode = self[InternalData].virtualNode
	local context = virtualNode.context

	return context[key]
end
