-
Notifications
You must be signed in to change notification settings - Fork 19
Description
It's not a major change, but certainly a major paradigm pivot. It would be awesome to pivot this library from being strictly React specific, and allow the user to specify a JXM renderer themselves.
i.e., instead of using React.createElement, it would be cool if I could pass a function to JSONX that would be invoked whenever an element is created.
The implementation might look like simply abstracting all React.createElement calls to a jxmProvider(type, props, children), and probably making (...args) => React.createElement(...args) the default provider or something.
I put together something very similar to this utility for React, and this is a feature I was planning on adding, but I think it makes a lot of sense to go with something that already exists.