How to pass in an instance variable from a React component to its HOC?

Posted by Jessica Taylor | Updated on

How to pass in an instance variable from a React component to its HOC?

I came up with a different strategy. It acts roughly like the Redux connect function, providing props that the wrapped component isn’t responsible for creating, but the child is responsible for using them as they see fit:

CanvasElement.js

Selectable.js


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers