A Taiwanese electronics firm says it will build a factory in the US state of Wisconsin, following an invitation from US President Donald Trump.