alberto-sosa
Hi all. I am

Alberto Sosa

> Senior Developer

// Experienced Software Developer with a Bachelor's Degree in Software Engineering // Over 14 years developing web applications, mobile apps, and custom software solutions
background blur greenbackground blur blue
useEffect(() => {
      let span = rolesRef.current;
      const listener = () => {
        if (rolesCounter.current === profile.roles.length - 1) {
          rolesCounter.current = 0;
        } else {
          rolesCounter.current++;
        }
        span.innerHTML = profile.roles[rolesCounter.current];
      };
      span.addEventListener("animationiteration", listener);
      return () => {
        span.removeEventListener("animationiteration", listener);
      };
  }, [rolesCounter]);
const handleSidebarChange = useCallback((item: SidebarItemType) => {
    setSelectedTech((prevState) => {
      if (prevState) {
        return {
          ...prevState,
          [item.type as TechnologyType]:
            !prevState[item.type as TechnologyType],
        };
      }
      return null;
    });
  }, []);
 const calculateLines = () => {
    const textContainer = linesDivRef.current;
    if (textContainer) {
      const computedStyle = window.getComputedStyle(textContainer!);
      const lineHeight = parseFloat(computedStyle.lineHeight);
      const containerHeight = textContainer.clientHeight;
      const numberOfLines = Math.round(containerHeight / lineHeight);

      setLines(numberOfLines);
    }
  };
sections.map((section: SidebarSectionType) => (
        <SidebarSection
          key={section.name}
          items={section.items}
          header={section.name}
          renderItem={(item) => {
            return (
              <SidebarItemWithCheckbox
                key={item.name}
                active={selected ? selected[item.type] : false}
                item={item}
                onSelectItem={() => handleSelect(section, item)}
              />
            );
          }}
        />
      ))
const getYachtsLocations = async ({ text, locale }) => {
  const findText = escapeRegExp(String(text.trim()))
  return Yacht.aggregate([
    {
      $match: {
          $or: [
            { [`location.city.${locale}`]: new RegExp(findText, 'i')},
            { [`location.country.${locale}`]: new RegExp(findText, 'i')},
          ],
        }
    },
    //...
  ])
}

personal-info

  • >
    biobio
  • >
    interestsinterests
  •  
    universityuniversity
    ** I am an experienced software engineer with a Bachelor's Degree in Software Engineering and over 14 years developing web applications, mobile apps, and custom software solutions. With a proven track record of successfully delivering projects to clients, I am adept at implementing advanced features and functionalities. Throughout my career, I have worked extensively with a wide range of technologies, including NodeJS, React, React Native, MongoDB, NextJS, GraphQL, Typescript, JavaScript, Redux, Express, SocketIO, Tailwindcss, PHP, MySQL, Swift, Objective-C, Firebase, AWS, Stripe, C#, and Linux. These tools have empowered me to tackle complex challenges and build robust applications. I am passionate about leveraging technology to drive innovation and deliver impactful solutions. I thrive in dynamic environments where I can apply my expertise to solve complex problems and contribute to the success of projects. */

    code-snippets

    user
    @albertososaCreated 1 month ago
    // React - Tailwindcss - Typescript
    
    const [lines, setLines] = useState<number>(0);
    
    const linesDivRef = useRef<HTMLDivElement>(null);
    
    useEffect(() => {
        calculateLines();
    
        window.addEventListener("resize", calculateLines);
    
        return () => window.removeEventListener("resize", calculateLines);
      }, [info]);
    
    // create a list of numbers
    const list = useMemo(() => {
        return (
          <ul className={"flex flex-col pl-4 mr-2"}>
            {new Array(lines).fill(0).map((_, index) => {
              return (
                <li key={index} className={"flex justify-between w-10"}>
                  <span>{index + 1}</span>
                  <span>{index > 0 ? "*" : "/"}</span>
                </li>
              );
            })}
          </ul>
        );
      }, [lines]);
    
    const calculateLines = () => {
        const textContainer = linesDivRef.current;
        const computedStyle = window.getComputedStyle(textContainer!);
        const lineHeight = parseFloat(computedStyle.lineHeight);
        const containerHeight = textContainer!.clientHeight;
        const numberOfLines = Math.round(containerHeight / lineHeight);
    
        setLines(numberOfLines);
      };
    
    // ...

    projects

    • ReactReact
    • ReduxRedux
    • TailwindTailwind
    • ExpressExpress
    • NodeJSNodeJS
    • TypescriptTypescript
    • NextJSNextJS
    • SocketIOSocketIO
    • PHPPHP
    • MongoDBMongoDB
    • MySQLMySQL
    • AWS EC2AWS EC2
    • AWS S3AWS S3
    • HerokuHeroku
    • VercelVercel
    • SwiftSwift
    • Objective-CObjective-C
    find me on:
    linkedingithub
    _download-resume