A two-dimensional hexagonal boron nitride/polymer nanocomposite for flexible resistive switching devices