Spintronic devices based on two-dimensional magnets | Synapse