PureComponent.extend=Component.extend function PureComponent.shouldUpdate(P,J,F)if F~=P.state then return true end if J==P.props then return false end for J,F in pairs(J)do if P.props[J]~=F then return true end end for F,P in pairs(P.props)do if J[F]~=P then return true end end return false end return PureComponent

PureComponent.extend = Component.extend

function PureComponent:shouldUpdate(newProps, newState)
	-- In a vast majority of cases, if state updated, something has updated.
	-- We don't bother checking in this case.
	if newState ~= self.state then
		return true
	end

	if newProps == self.props then
		return false
	end

	for key, value in pairs(newProps) do
		if self.props[key] ~= value then
			return true
		end
	end

	for key, value in pairs(self.props) do
		if newProps[key] ~= value then
			return true
		end
	end

	return false
end

return PureComponent
