No the 10-42 11 speed sram cassette is NOT compatible. You would have to go with a Sram NX 11-42 or any shimano 11-42 11 speed cassette. The 10-42 cassette require a srams funky XD Driver freehub body. You may be able to swap out your standard shamano compatible freehub to the sram xd drive but you will have to look for yourself.
As pointed out by dsaul downgrading to Sram brakes from SLX seems like a bad idea. Also I don't see much point in going from 10 speed to 11 either for that matter. If you are just wanting to go 1x going 1x10 is much cheaper since all you really need is a narrow wide chainring and maybe a Sunrace 11-42 10 speed cassette if you need the extra range. What problem are you having with the SLX shifters?