Lens restructure (#540)

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman authored and GitHub committed 2020-06-30 14:35:16 +03:00
1 parent e810eab39f
commit b7974827d2
786 files changed
+14567 -24066

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
// Type guard for checking valid react node to use in render
import React, { ReactNode } from "react"
export function isReactNode(node: ReactNode): node is ReactNode {
return React.isValidElement(node)
|| Array.isArray(node) && node.every(isReactNode)
|| node == null
|| typeof node !== "object"
}