In come cases, we need to preivew the image when clicking the image. But after srearching in the github, i can not find a wheel that can statisfy my requirement. So, as a engineer, i attempt writing an avaiable one in order to be used in my projects.
npm i --save previewjs
import previewjs from 'previewjs'
previewjs(srcs) // srcs is an array containing urls of images