I build a restaurant app using React JS and I want to print a receipt when the order got accepted. The restaurant has a wifi printer and I have no idea how should I connect a printer with that website.
There are two ways I know we can do this.
Windows.print() - When added this native trigger, it'll open the regular print dialog box. Which in further you can select you printer and one can take print out.
ReactToPrint - react-to-print - This library also help you to achieve the same results but in abstracted manner and some over-the-top modifications.
Though, if you're wondering that wherever an order is placed but print should be printed then this might not help but I strongly believe that this will help you figure out something.
Some other useful resources:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.