[I'm not sure if this is the right project for this, but figured I'd start here since I'm using the htm+preact standalone bundle.]
tl;dr: I'm setting a Context.Provider value as an Array, however in the consumer (functional react component using useContext), it's received as a String.
This codepen illustrates the problem. In both Firefox and Chrome, this renders the following:
Provider sets context as [object Array]
Consumer receives context as [object String]
Edit: As noted in the codepen, this issue (context value getting cast to String) happens regardless of the type being set.
[I'm not sure if this is the right project for this, but figured I'd start here since I'm using the htm+preact standalone bundle.]
tl;dr: I'm setting a Context.Provider
value
as an Array, however in the consumer (functional react component usinguseContext
), it's received as a String.This codepen illustrates the problem. In both Firefox and Chrome, this renders the following:
Edit: As noted in the codepen, this issue (context value getting cast to String) happens regardless of the type being set.