3 ms·
Implementing state isnt very difficult. I think youre thinking of a very static use case again. Link to page number doesnt make too much sense when the data ch
by andoando 1y ago
Implementing state isnt very difficult.
I think youre thinking of a very static use case again. Link to page number doesnt make too much sense when the data changes (and do you really want to refresh the whole page just to change the table data?), but yes thats easy to implement to.
It would just look something like
let pageNum = params.page
<Table defaultPage={pageNum}/>
Now think about if you need to implement a more complex table in an admin UI that lets you filter / sort, delete/add rows, etc. Thats where reactivity is really really nice. All you have to do is something like
items = items.filter(i -> i.name.startsWith(input)) and youre done.