Is there a way to detect if the QR Code will work properly as the encoding mode will change the max number of characters that can be stored will also change.
qrcode.react supports encoding text only, in a single segment. The encoding library being used does minimal detection to determine if the text being encoded can follow an optimized path for Numeric or Alphanumeric modes, allowing for more data to be encoded. Otherwise, it will encode following Byte mode. This mode includes supports multi-byte Unicode characters such as Kanji, however it does not support the optimized Kanji encoding mode.
Or
Should I hard code the limit (max characters) to the like 2000. This way I can control in the frontend the maximum characters that can be entered by the user.