Tag: component
-
Multiple Instances of Component Firing Incorrect onChange – ReactJS
Hi everyone, I ran into a bit of an issue today while trying to render multiple instances of a component on a single page. Each component had a file input that was bound with an onChange event. When triggered the onChange function referenced the first component placed on the page no matter which instance was…
-
Avoiding Wrapper Divs in ReactJs
Hi everyone, Just a quick post on how you can avoid wrapper divs in ReactJs. It’s particularly useful when populating tables or creating parts of a larger component. Instead of the following: return ( Frogs Turtles ); You can use fragments: import React, { Fragment } from ‘react’ … return ( Frogs Turtles ); The…