Bring lib inline with react 0.14
This brings the min peer dependency up to react 0.14 (the react and new react-dom modules are now both depended upon @ 0.14.x).
No functionality changes, but ensures everything's in line with 0.14 so the library will now work up to at least react 0.16, and allowed for one code/perf improvement under the hood.
Does mean library will no longer work for any consumers using react < 0.14, so have bumped the major version number to 1.x.x
Changes:
- Replaced ES6 class with new react 0.14 stateless functional component pattern. Less code, and promises performance optimisations in future versions.
- Fixed tests which failed against 0.14 - react 0.14 made some fixes/improvements to generated html, so expected markup is now slightly different.
- Upgraded function calls so all now-deprecated ones are no longer called. Involved use of new react-dom module in the tests.
- Introduced change to eliminate warning introduced in react 0.14 about img tags having children. Summary: children array was being passed generically for all elements, was empty for img tag but React still complained. Probably didn't matter anyway, but better to address it and not have the warning.
Again, this branch incorporates the root element props features in my other pull request.
I guess it might make sense to merge that one first, then create a 0.x branch before pulling this, so react > 0.13.2 support still continues on its own legacy branch.
@davnicwil why did you remove lib folder from .gitignore ? It will be published to npm anyway ( https://github.com/alexkuz/markdown-react-js/blob/master/.npmignore )
@thangngoc89 it's because I'm currently requiring the library like this: dependencies: { "markdown-react-js" : "davnicwil/markdown-react-js#1.x" }
I.e. pulling from github rather than the npm central repo since my branch isn't yet merged, built, put into npm central repo etc.
So before, without the build in lib/index.js in the repo, after pulling in the library I had go to node_modules, copy in the source and build it manually. Now it just works.
Thank you for clarification. Did you heard from the author recently ?
No worries! Last I heard @alexkuz told me he was reviewing my PRs, as well as considering other changes.
Any updates on this @alexkuz? Would be handy to get these changes into npm central :-)
@davnicwil sorry, I still haven't reviewed these.
As for lib, it's better to leave it in .gitignore, I believe (you can use npm link ~/your-projects-dir/markdown-react-js for development).
Is this fixed in 0.4.0?
hey @davnicwil would you like to be added as a maintainer?
@kof I haven't looked at this in a long time, and likely won't be able to give it much attention until after the new year, but sure if you want to add me I would be happy to clean this up and get it merged.
I've sent invites to @davnicwil and @smm-telus. Thank you everyone!