Skip to content

v0.2.0

Compare
Choose a tag to compare
@lxsmnsyc lxsmnsyc released this 03 Mar 01:49
· 241 commits to main since this release
  • Now auto-memoizes useRef
import { useRef } from 'react';
function Example(props) {
  return useRef(props.value);
}
// Compiles into
import { useMemo as _useMemo } from "react";
import { useRef } from 'react';
function Example(props) {
  let _c = _useMemo(() => new Array(1), []);
  let _v = _c[0] || (_c[0] = {
    current: props.value
  });
  return _v;
}

Full Changelog: v0.1.1...v0.2.0