kciter / react-barcode

A <Barcode/> component for use with React.
http://kciter.github.io/react-barcode/
ISC License
400 stars 72 forks source link

add support for img element #26

Closed benhancock-com closed 6 years ago

benhancock-com commented 6 years ago

I've added a small snippet of code to enable the barcode to rendered as an <img> element (alongside the existing <svg> and <canvas> elements). Full jsbarcode documentation here.

kachkaev commented 6 years ago

@benhancockco do you think this can partially enable server-side rendering (https://github.com/kciter/react-barcode/issues/19)?

benhancock-com commented 6 years ago

@kachkaev unfortunately this will not enable server-side rendering to any degree.

kachkaev commented 6 years ago

What changes would be required to make SSR happen? @benhancockco and @kciter, could you please share your thoughts in https://github.com/kciter/react-barcode/issues/19? If SSR is possible by the upstream lib, but there's just not enough time to enable it in react-barcode, I'll be happy to work on a PR.

benhancock-com commented 6 years ago

Unfortunately my knowledge on SSR is limited so I am unable to assist on this front., @kachkaev.