nl_tokens: Remove a layer from the state . @param { Object } state Current state . @param { Object } action Action to handle .
pl_tokens: function removeLayer ( state , action ) { const new_layers = [ ] ; for ( let i = 0 , ii = state . layers . length ; i < ii ; i ++ ) { if ( state . layers [ i ] . id !== action . layerId ) { new_layers . push ( state . layers [ i ] ) ; } } return Object . assign ( { } , state , { layers : new_layers , } , incrementVersion ( <mask> . metadata , LAYER_VERSION_KEY ) ) ; }