Can you use recompose or higher order components with this?
The short answer is that a VM component is a managed React component. You can wrap it however you want and the inner component will continue to behave the way it was designed.
For a long answer I need more info. Can you give an example of something you want to do? I ask because Iâve never heard of anyone wanting, much less needing, higher order components with VM.
Itâs only a compliance with convention concern.
Would be cool if you could convert react to viewmodel and back as source code goes.
Thatâs not possible in any satisfactory way. Itâs like compiling another language to JavaScript. Yeah, the end result executes, but itâs far from what youâd write by hand.
I imagine thereâre some prettify layers through which them innards could be churned through, CS is somewhat pallatable.
The problem is intent. CS motto is âitâs just Javascriptâ. Now imagine transpiling CS if it didnât allow for map or reduce. You could definitely transpile it but you wouldnât end up with idiomatic Javascript.