Source: templates/IfElse.js

import React, { useContext, useEffect, useMemo } from "react";
import { IfContext } from "./If";
/**
 * Componente que usando el contexto if solo muestra el contenido si no se cumplen condiciones dentro del if
 * @name Reactor.Components.Templates.IfElse
 * @class 
 * @example 
<if variable="tipo" context="un_contexto">
  <condition value="valor" operator="=" type="text">
    contenido condicional
  </condition>
  <else>
    contenido en caso contrario
  </else>
</if>
*/

export const IfElse = ({children}) => {
  const { match } = useContext(IfContext);
  return (
    <>
      {!match ? children : <></>}
    </>
  )
}