Comments (4)
Are you trying to create an instance variable? If so it'll need to be in a constructor:
constructor() {
super();
this.cardImg = {...};
}
My comment about passing an object I meant:
<Card img={{src: '', alt: ''}} />
That would allow (in the card component) to do this.props.img.src
and this.props.img.alt
. grouping the image API in to one object.
from vanilla-framework-react.
from vanilla-framework-react.
@anthonydillon No, doesn't make a difference but based on @Lukewh's comment on the other PR I think I'm passing the object incorrectly which is why it's complaining...
from vanilla-framework-react.
@Lukewh Yes, that was it, needed a constructor()
- thanks!
from vanilla-framework-react.
Related Issues (20)
- Add HeaderNavigation component
- Add SidebarNavigation component HOT 1
- Add Pagination component
- Add Slider component
- Add expanding modifier to Table component HOT 2
- Add mobile-card modifier to Table component
- Add Tooltip component HOT 1
- Update Button tests
- Update Accordion tests
- Importing some components works but others fail HOT 2
- Join Storybook js.org library of examples HOT 2
- npm package should not be bundled HOT 4
- Update Storybook to Vanilla v1.8.0
- Static Table component issues
- Can't set `className` on TableCell
- Reduce the amount of snapshot tests
- Replace placekitten images with generic placeholders HOT 1
- Navigation component should be able to be constrained by "row" class HOT 1
- Button in ContextualMenu doesn't obey className prop
- Checkbox opacity set to 0 when to the right of label
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 vanilla-framework-react.