nadimtuhin / redux-vue Goto Github PK
View Code? Open in Web Editor NEWVue redux binding like react-redux
License: MIT License
Vue redux binding like react-redux
License: MIT License
Hi I am interested in how this works and was just perusing the code. I noticed that your connect function is a HOC that uses jsx in a render function. The readme also says that this library should be used in vue-jsx components. Is that a strict limitation or just what this library was designed for and tested against. If it can only be used in jsx components, why is that?
This is purely for my own education.
Thanks.
this.$slots.default
is undefined when Component is using Connect
. That means no data is found from that child component. Thanks in advance ๐ .
I'd like to create a component that has some props connected to the store and some props exposed. When I call connect
on a component, I get a new component that has no props. What I would like to have is a new connected component where only the props that were defined in the mapStateToProps
and mapActionsToProps
are no longer exposed and the other props are still settable.
Maybe there is a workaround (except for putting non-store related code into mapStateToProps
)?
Some example code:
import MyComp from './MyComp';
ConnectedMyComp = connect(mapStateToProps)(MyComp)
new Vue({
el: '#app',
render: h => h(ConnectedMyComp, {
// This does not work
props: {
nonMappedProp: 'Foo'
}
})
})
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.