Open thcolin opened 7 years ago
wdyt @tbranyen ?
Looks good to me. I think I may have just caused a conflict by merging. Can we get this rebased to master and I'll give it a whirl in my app!
@tbranyen I've worked a bit more on this and rebase will come in a couple of days ;)
Sorry, I'll won't be able to complete this PR, I tried last week without any luck, so I made my own in React way, sorry 😔 I deprecated my repo thcolin/hyperlist-react, but anyone who want to start from where I was can fork it of course ! I tried tounpublish
the library on npm
but they changed their policy so I could only deprecate
it but see :
If another member of the community wishes to publish a package with the same name as a security placeholder, they’ll need to contact support@npmjs.com. npm will determine whether to grant this request. (Generally, we will.)
Sorry for any false hope 😔
@thcolin I'm going to reopen this since it's interesting work and maybe someone else can pick it up. It's open source after-all.
Hi !
My friend @soyuka told me about your library for my current React project, and he show me your ongoing pull request to improve React support without interfering too much with current implementation (Some initial work on React support #8).
So I work a bit on it and here's my suggestion :
inspectElement
andtransformElement
functions and make them configurable (as well asmergeStyle
)HyperList
will use its own methods (HyperList.inspectElement
,HyperList.transformElement
,HyperList.mergeStyle
) which expect aDOM
element as first argsinspectElement
,transformElement
andmergeStyle
because ofVirtual DOM
usageThis solution should allow you to support various not DOM-friendly frameworks in the long term.
If you're okay with my changes, I'll make another commit to remove
react-example.html
andreact
specific dev-dependecies and then create ahyperlist-react
npm module to bundleHyperListReact
React component and usage documentation. It would be helpful to have a link to futurhyperlist-react
repo onREADME
project too.HyperListReact
component would look like this :With same usage as #8 (see
examples/react-example.html
for full example) :