Skip to content

Releases: XantreDev/react-fast-hoc

[email protected]

21 Oct 07:56
caea9e0
Compare
Choose a tag to compare

Patch Changes

  • 0920933: Removed deprecated api examples from README
    Fixes: #20

[email protected]

21 Oct 07:03
0492426
Compare
Choose a tag to compare

Patch Changes

  • 32e18c1: Fixed wrapping into hoc in case of nested React.memo
    Resolves: #17

    const Component = transformProps(
      React.memo(
        React.memo((props) => {
          console.log(props); // prev: { c: 30 }, now: { a: 10, b: 20, c: 30 }
          return null;
        })
      ),
      (props) => ({ ...props, a: 10, b: 20 })
    );
    
    root.render(<Component c={30} />);

[email protected]

17 Oct 05:30
c810c0e
Compare
Choose a tag to compare

Minor Changes

  • d2cc312: Deprecated mimicToNewComponent and make default to false (true was before)

  • 8680658: Made displayName editable for each transformed component:

    const _ = transformProps(A, (props) => props, {
      displayNameTransform: {
        value: (name) => name + "C",
        type: "rewrite-dynamic",
      },
    });
    expect(_.displayName).toBe("AC");
    _.displayName = "D";
    expect(_.displayName).toBe("D");
  • d2cc312: Added new syntax for name rewriting, old one is deprecated and will be removed soon

    Static name rewrite

    transformProps(B, (props) => props, {
      displayNameTransform: {
        type: "rewrite",
        value: "D",
      },
    });
    
    transformProps(A, (props) => props, {
      displayNameTransform: {
        type: "prefix",
        value: "CBC",
      },
    });

    Dynamic name rewrite

    transformProps(A, (props) => props, {
      displayNameTransform: {
        value: (name) => name + "C",
        type: "rewrite-dynamic",
      },
    });
  • f057209: Added support for components wrapped with React.lazy

[email protected]

23 Sep 09:44
5a60f8c
Compare
Choose a tag to compare

Patch Changes

  • 3537998: Fix wrapIntoProxy type issue

[email protected]

05 Aug 18:22
4be9b04
Compare
Choose a tag to compare

Minor Changes

  • 309bcff: Add oportunity to transform component directly, not only props

[email protected]

28 Jun 09:21
5e947dd
Compare
Choose a tag to compare

Patch Changes

  • cc1dfd3: Moved build deps to devDependencies, and fixed type inference

[email protected]

06 Jun 20:18
e2301cf
Compare
Choose a tag to compare

Patch Changes

[email protected]

06 Jun 19:03
f388d74
Compare
Choose a tag to compare

Patch Changes

  • 5d82ea0: Trying to really add treeshaking

[email protected]

06 Jun 18:45
360f5fb
Compare
Choose a tag to compare

Patch Changes

  • e2d3d88: Added RewriteCall proxy handler, can be used with wrapIntoProxy
  • 695edfd: Added treeshaking

[email protected]

02 Jun 17:56
c0963e8
Compare
Choose a tag to compare

Patch Changes