Commit Graph

30 Commits

Author SHA1 Message Date
Evan You
dc229bcda4 wip(hydration): hydrate multi-element static nodes 2020-05-15 16:30:20 -04:00
Evan You
e087b4e024 fix(hydration): fix text mismatch warning 2020-04-29 17:07:41 -04:00
Evan You
ec4a4c1e06 refactor(runtime-core): refactor props resolution
Improve performance in optimized mode + tests
2020-04-06 17:37:47 -04:00
Evan You
eee5095692 refactor: rename <portal> to <teleport>
BREAKING CHANGE: `<portal>` has been renamed to `<teleport>`.

    `target` prop is also renmaed to `to`, so the new usage will be:

    ```html
    <Teleport to="#modal-layer" :disabled="isMobile">
      <div class="modal">
        hello
      </div>
    </Teleport>
    ```

    The primary reason for the renaming is to avoid potential naming
    conflict with [native portals](https://wicg.github.io/portals/).
2020-04-01 21:55:19 -04:00
Evan You
b74bab216c feat(portal): hydration support for portal disabled mode 2020-03-30 11:24:29 -04:00
Evan You
e866434f0c feat(portal): SSR support for multi portal shared target 2020-03-27 20:49:01 -04:00
Evan You
cba2f1aadb feat(asyncComponent): SSR/hydration support for async component 2020-03-23 16:14:56 -04:00
Evan You
ba9a91c48c refactor: remove null comparisons 2020-03-18 18:14:51 -04:00
Evan You
aa4ab39c1a refactor: separate vnode hooks and directive hooks 2020-03-18 12:30:26 -04:00
Evan You
60ed4e7e08 feat(ssr): improve fragment mismatch handling 2020-03-13 18:02:53 -04:00
Evan You
eb1d538ea2 test(ssr): hydration suspense tests 2020-03-13 13:05:05 -04:00
Evan You
a05d41c940 refactor(ssr): adjust ssr fragment anchor content 2020-03-13 13:05:05 -04:00
Evan You
cad5bcce40 feat(ssr): hide comment anchors during hydration in dev mode 2020-03-13 13:05:05 -04:00
Evan You
a3cc970030 feat(ssr/suspense): suspense hydration
In order to support hydration of async components, server-rendered
fragments must be explicitly marked with comment nodes.
2020-03-13 13:05:05 -04:00
Evan You
ca5f39ee35 refactor(runtime-core): adjust patchProp value arguments order
BREAKING CHANGE: `RendererOptions.patchProp` arguments order has changed

  The `prevValue` and `nextValue` position has been swapped to keep it
  consistent with other functions in the renderer implementation. This
  only affects custom renderers using the `createRenderer` API.
2020-03-09 16:15:49 -04:00
Evan You
dd2d25fee1 test(ssr): test for hydration mismatch handling 2020-03-06 15:39:54 -05:00
Evan You
08bba093af test(ssr): more hydration tests 2020-03-05 10:29:50 -06:00
Evan You
fb4856b363 test(ssr): hydratioon tests (wip) 2020-03-04 17:06:50 -06:00
Evan You
91269da52c feat(ssr): hydration mismatch handling 2020-03-03 15:12:38 -06:00
Evan You
4809325c07 refactor(hydration): move fragment to seaprate function + skip normalization in optimized mode 2020-02-27 11:26:39 -05:00
Evan You
11d2fb2594 refactor(fragments): remove visible anchors for fragments 2020-02-26 16:32:06 -05:00
Evan You
9d2ac6675a refactor: make portal tree-shakeable 2020-02-15 17:44:37 -05:00
Evan You
70dc3e3ae7 feat(ssr): support portal hydration 2020-02-14 21:04:08 -05:00
Evan You
96605b79a3 types: avoid duplicate type declarations for renderer closure functions 2020-02-14 16:25:41 -05:00
Evan You
80904e92b8 types: cleanup renderer & hydration typing 2020-02-14 12:33:32 -05:00
Evan You
629ee75588 perf: prevent renderer hot functions being inlined by minifiers
Terser will aggressively inline hot functions in renderer.ts in order
to reduce "function" declarations, but the inlining leads to performance
overhead (small, but noticeable in benchmarks).

Since we cannot control user's minifier options, we have to avoid the
deopt in the source code by using arrow functions in hot paths.
2020-02-14 03:27:27 -05:00
Evan You
6df2aca070 refactor(types): move shapeFlags to shared 2020-02-14 01:36:42 -05:00
Evan You
167f8241bd refactor(ssr): make hydration logic tree-shakeable 2020-02-14 01:30:08 -05:00
Evan You
112d8f7d86 refactor: use explicit exports for runtime-core 2020-02-14 00:13:54 -05:00
Evan You
42d80b5888 wip(ssr): component hydration 2020-02-13 23:31:03 -05:00