v0.2.0
- 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