react-apollo v2.3.1 Release Notes

Release Date: 2018-11-15 // over 5 years ago
  • ๐Ÿ‘Œ Improvements

    • โช Restore original getDataFromTree(tree, context) API, and introduce a new alternative called getMarkupFromTree to enable custom rendering functions:
      export default function getDataFromTree(
        tree: React.ReactNode,
        context: { [key: string]: any } = {},
      ) {
        return getMarkupFromTree({
          tree,
          context,
          renderFunction: renderToStaticMarkup,
        });
      }
    
      export type GetMarkupFromTreeOptions = {
        tree: React.ReactNode;
        context?: { [key: string]: any };
        renderFunction?: typeof renderToStaticMarkup;
      };
    
      export function getMarkupFromTree({
        tree,
        context = {},
        renderFunction = renderToStaticMarkup,
      }: GetMarkupFromTreeOptions): Promise<string> {...}
    

    PR #2586

    ๐Ÿ› Bug Fixes

    • ๐Ÿ”– Version 2.3.0 was published incorrectly, breaking nested react-apollo/... imports. This problem was fixed in version 2.3.1 by running npm publish from the lib/ directory, as intended. Issue #2591