I prever laptop only because I am often on the go and not coding on the same place all the time.
Community is adapting for M1 and for the type of coding I do, it is perfect! You might research first if the tool or language you use works great in M1 macs first though.
I am still coding in my M1 mac with some hick ups but still good.