kdong007 / taro-apollo Goto Github PK
View Code? Open in Web Editor NEW仿照 react-apollo 1.x版本 以及 taro-redux做的 graphql componet wrapper
License: MIT License
仿照 react-apollo 1.x版本 以及 taro-redux做的 graphql componet wrapper
License: MIT License
初学者不是很理解各部分合作关系,希望可以有一个demo可以梳理项目结构。
感激不尽~~
当用Taro.navigateTo()进入新页面后需要用withQuery请求,我的方法是先用 componentWillPreload (params) 把params的值赋在props上,props.var = params.var 然后在@withQuery中提取props中的var。但是这样有时候会提取不到,原因可能是有时候@withQuery比componentWillPreload执行早
@withQuery({
query,
variables: (props, state) => {
return {
var: props.var
};
},
})
有没有好的解决方案?
期望兼容小程序和H5,懒得下载下来试了。
请问是否支持H5?
可不可以添加一个subscribe的功能?
后端程序员,不太懂react和js...
我看了下react-apollo最新的源码,发现在使用useQuery之类的hooks的时候,client也仅仅是直接从context获取。
本身apollo-client是一个纯js实现,taro支持应该是没问题的吧(?)
那是否可以直接修改react-apollo,替换成Taro的context、hooks等等,去除其不支持的部分,如context.Consumer\ReactNode就可以?
想问一下小程序里能做订阅查询嘛
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.