Comments (7)
I'm not sure if fake rendering is really a good idea. Mocking sounds super fragile and I doubt it can be really that lightweight if we want to make sure things don't just break.
Maybe we can tackle this from a different perspective - is it possible to statically analyze and extract queries at build time (kinda like Relay Modern)?
from core.
Well, that's the approach taken by the official react-apollo (source). BTW it seems so much easier to do in React 😭
from core.
It looks quite fragile/hacky to me, and is essentially rendering the whole app twice... which means it decreases performance significantly... not sure if it's worth it at all.
That said it's totally possible in v3.
from core.
Also, it seems it cannot have nested components with queries. The walker stops when any component has async data. Still quite a limitation IMO.
from core.
Maybe we could make renderToString
asynchronous with ways to hook into it and do data prefetching and eventual secondary re-rerenders of components that prefetched some data?
from core.
BTW react-apollo switched to rendering the app multiple times: apollographql/react-apollo#2533
from core.
Closing in favor of #11
from core.
Related Issues (20)
- 可选的boolean类型属性的默认值有问题 HOT 2
- Discrepancy between dev and build HOT 2
- Watching a model with custom get and setter doesn't work in some cases.
- type definition for custom elements created without using vue to consume in vue app
- A separate type for the setter in Ref<T, S> can lead to nested refs HOT 1
- v-bind in CSS values are set after the component's element is already in the DOM HOT 5
- `defineModel` doesn't run if the same value is selected HOT 6
- Allow unrelated getter and setter Ref types leads to nested array type errors. HOT 7
- Event stopImmediatePropagation does not prevent other listeners from being called HOT 2
- Memory leak on last clicked input HOT 2
- Nested scope template HOT 1
- 内置的“withDirectives”API无法实现给vnode动态配置指令功能 HOT 3
- Missing support TS 5.5, without `DOM` lib in tsconfig
- Trying to dynamically set `content` of a pseudo-element (::before, ::after), renders nothing HOT 2
- Reactivity broken with setTimeout in instance constructor HOT 1
- Extended array methods are called with unexpected values HOT 2
- parameter missing in extended array find method
- ComputedRef should not be assignable to WritableComputedRef
- Inconsistent execution order of Sync Watchers on `computed` property HOT 4
- runtime prop type of `keyof SomeInterface['property']` resolves to `Object` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from core.