xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

React & `event.persist()`

React & event.persist()

event.persist()

https://reactjs.org/docs/events.html#event-pooling

Tabs API

https://ant.design/components/tabs-cn/#Tabs


    onTabClick = (e) => {
        // e.persist();
        let value = e.target.value;
        console.log(`value =`, value);
    }




    onTabClick = (e) => {
        // e.persist();
        let title = e.target.dataset.title;
        console.log(`title =`, title);
    }
    // onTabClick = (value) => {
    //     // e.persist();
    //     console.log(`value =`, value);
    // }

React & Hooks

https://reactjs.org/docs/hooks-reference.html#useref

posted @ 2018-12-25 17:29  xgqfrms  阅读(2713)  评论(0编辑  收藏  举报