render() {
		// const thiz = this;
		if (store.state.items.length === 0) {
			this.element.innerHTML = `<p class="no-items">You've done nothing yet 😢</p>`;
			return;
		}
		this.element.innerHTML = `
            <ul class="app__items">
                ${store.state.items
					.map(item => {
						return `
                        <li>${item}&nbsp; &nbsp;<button aria-label="Delete this item">x</button></li>
                    `;
					})
					.join('')}
            </ul>
        `;
		this.element.querySelectorAll('button').forEach((button, index) => {
			button.addEventListener('click', () => {
				store.dispatch('clearItem', { index });
			});
		});
	}
/**
	 * React to state changes and render the component's HTML
	 *
	 * @returns {void}
	 */
React to state changes and render the component's HTML
@returns {void}
React to state changes and render the component ' s HTML @returns { void }
render() {
		if (store.state.items.length === 0) {
			this.element.innerHTML = `<p class="no-items">You've done nothing yet 😢</p>`;
			return;
		}
		this.element.innerHTML = `
            <ul class="app__items">
                ${store.state.items
					.map(item => {
						return `
                        <li>${item}&nbsp; &nbsp;<button aria-label="Delete this item">x</button></li>
                    `;
					})
					.join('')}
            </ul>
        `;
		this.element.querySelectorAll('button').forEach((button, index) => {
			button.addEventListener('click', () => {
				store.dispatch('clearItem', { index });
			});
		});
	}
render ( ) { if ( store . state . items . length === 0 ) { this . element . innerHTML = ` return ; } this . element . innerHTML = ` ${ store . state . items . map ( item => { return ` ${ item } ` ; } ) . join ( '' ) } ` ; this . element . querySelectorAll ( 'button' ) . forEach ( ( button , index ) => { button . addEventListener ( 'click' , ( ) => { store . dispatch ( 'clearItem' , { index } ) ; } ) ; } ) ; }
React to state changes and render the component's HTML
 @returns {void}
React to state changes and render the component ' s HTML @returns { void }
// const thiz = this;