stateman icon indicating copy to clipboard operation
stateman copied to clipboard

Always call `update` after `enter`?

Open leeluolee opened this issue 8 years ago • 0 comments

We have used stateman in a dozen projects already and find that we always do similiar work in enter and update , so most of the states like below

stateman.state({
    'app.blog': {
        enter: function( option ){
             this.udpate(option)
         }
        update: function(option){
            // logic here
        }
    }
})

At that rate, why not call update after enter?

Plan to change the logic in 0.3.0.

Just get it over with instead of keep suffering.

leeluolee avatar Jun 02 '16 16:06 leeluolee