Showing 2 of 2 total issues
Function watchedState
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const watchedState = onChange(state, (path, value) => {
if (path === 'addFeedProcess.error' && value) renderError(elements, i18n, value);
if (path === 'feeds' && value.length) renderFeeds(value, i18n, elements);
if ((path === 'posts' && value.length) || (path === 'uiState.seenPosts')) renderPosts(state, i18n, elements);
if (path === 'uiState.activePostId') {
Function renderPosts
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderPosts = (state, i18n, elements) => {
elements.posts.innerHTML = '';
const container = createWrapper('posts', i18n);
elements.posts.appendChild(container);