Issues importing wkx to convert wkb to wkt

I'm trying to import wkx in my react-native app so I can convert wkb values to wkt values. I have installed wkx, and also buffer by doing:

yarn add wkx and yarn add buffer. Initially it had an error in wkx/lib/point.js sayingutils package not found so I also did yarn add utils.

In the file I want to use wkx in, I have done:

import 'wkx'
import 'buffer'

That fixed the buffer error but when the app loads, I get this error:

Unhandled JS Exception: Buffer is not defined

In the stack trace it shows point.js and geometry.js:enter image description here

I get the same error when I use require like this:

var Buffer = require('buffer').Buffer
var wkx = require('wkx')