Compound Components In React

Compound components help developers build more expressive and flexible APIs to share state and logic within components. This tutorial explains how this can be achieved with the help of using the Context API and React to build components by using this advanced pattern.

Note: In order to be able to follow along, you’ll need a basic understanding of React and how the Context API works.

What Is A Compound Component?

Compound components can be said to be a pattern that encloses the state and the behavior of a group of components but still gives the rendering control of its variable parts back to the external user.

From the definition above, taking note of the keywords: state and behavior. This helps us understand that compound component deal with state (i.e. how state behaves across a component which is enclosed by an external user being the parent of the component).

The objective of compound components is to provide a more expressive and flexible API for communication between the parent and the child components.

Think of it like the <select> and <option> tags in HTML:

<select>
  <option value="volvo">Volvo</option>
  <option value="mercedes">Mercedes</option>
  <option value="audi">Audi</option>
</select>

The select tag works together with the option tag which is used for a drop-down menu to select items in HTML. Here the <select> manages the state of the UI, then the <option> elements are configured on how the <select> should work. Compound components in React are used to build a declarative UI component which helps to avoid prop drilling.

Prop drilling is passing props down multiple child components. This is also what they call a “code smell”. The worst part of prop drilling being that when the parent component re-renders, the child components will also re-render and cause a domino effect on the component. A good solution would be to use the React Context API which we will also look into later.

Applying Compound Components In React

This section explains the packages we can make use of in our application which adopt the compound component pattern of building components in React. This example is a Menu component from the @reach UI package.

import {
  Menu,
  MenuList,
  MenuButton,
  MenuItem,
  MenuItems,
  MenuPopover,
  MenuLink,
} from "@reach/menu-button";
import "@reach/menu-button/styles.css";

Here’s a way you can use the Menu component:

function Example() {
  return (
    <Menu>
      <MenuButton>Actions</MenuButton>
      <MenuList>
        <MenuItem>Download</MenuItem>
        <MenuLink to="view">View</MenuLink>
      </MenuList>
    </Menu>
  );
}

The example code above is one of the implementations of compound components in which you get to see that the Menu, MenuButton,MenuList, MenuItem and MenuLink were all imported from @reach/menu-button. As opposed to exporting a single component, ReachUI exports a parent component which is Menu accompanying its children components which are the MenuButton, MenuList, MenuItem and the MenuLink.

When Should You Make Use Of Compound Components?

As a React developer, you should make use of compound components when you want to:

  • Solve issues related to building reusable components;
  • Development of highly cohesive components with minimal coupling;
  • Better ways to share logic between components.
Pros And Cons Of Compound Components

A compound component is an awesome React pattern to add to your React developer toolkit. In this section, I’ll state the pros and cons of using compound components and what I have learned from building components using this pattern of development.

Pros

  • Separation Of Concern
    Having all the UI state logic in the parent component and communicating that internally to all the child components makes for a clear division of responsibility.

  • Reduced Complexity
    As opposed to prop drilling to pass down properties to their specific components, child props go to their respective child components using the compound component pattern.

Cons

One of the major cons of building components in React with the compound component pattern is that only direct children of the parent component will have access to the props, meaning we can’t wrap any of these components in another component.

export default function FlyoutMenu() {
  return (
    <FlyOut>
      {/* This breaks */}
      <div>
        <FlyOut.Toggle />
        <FlyOut.List>
          <FlyOut.Item>Edit</FlyOut.Item>
          <FlyOut.Item>Delete</FlyOut.Item>
        </FlyOut.List>
      </div>
    </FlyOut>
  );
}

A solution to this issue would be to use the flexible compound component pattern to implicitly share state using the React.createContext API.

Context API makes it possible to pass React state through nested components when building using the compound component pattern of building components in React. This is possible because context provides a way to pass data down the component tree without having to pass props down manually at every level. Making use of Context API provides loads of flexibility to the end-user.

Maintaining Compound Components In React

Compound components provide a more flexible way to share state within React applications, so making use of compound components in your React applications makes it easier to maintain and actually debug your apps.

Building A Demo

In this article, we are going to build an accordion component in React using the compound components pattern. The component we are going to be building in this tutorial would be a custom-made accordion component that is flexible and shares state within the component by using the Context API.

Let’s go!

First of all, let’s create a React app by using the following:

npx create-react-app accordionComponent
cd accordionComponent
npm start

or

yarn create react-app accordionComponent
cd accordionComponent
yarn start

The commands above create a React app, change the directory to the React project, and start up the development server.

Note: In this tutorial, we will be making use of styled-components to help style our components.

Use the command below to install styled-components:

yarn add styled-components

or

npm install --save styled-components

In the src folder, create a new folder called components. This is where all our components would live. Within the components folder, create two new files: accordion.js and accordion.styles.js.

The accordion.styles.js file contains our styling for the Accordion component (our styling was done using styled-components).

import styled from "styled-components";

export const Container = styled.div`
  display: flex;
  border-bottom: 8px solid #222;
`;

Above is an example of styling components using the css-in-js library called styled-components.

Within the accordion.styles.js file, add the remaining styles:

export const Frame = styled.div`
  margin-bottom: 40px;
`;
export const Inner = styled.div`
  display: flex;
  padding: 70px 45px;
  flex-direction: column;
  max-width: 815px;
  margin: auto;
`;
export const Title = styled.h1`
  font-size: 40px;
  line-height: 1.1;
  margin-top: 0;
  margin-bottom: 8px;
  color: black;
  text-align: center;
`;
export const Item = styled.div`
  color: white;
  margin: auto;
  margin-bottom: 10px;
  max-width: 728px;
  width: 100%;
  &:first-of-type {
    margin-top: 3em;
  }
  &:last-of-type {
    margin-bottom: 0;
  }
`;
export const Header = styled.div`
  display: flex;
  flex-direction: space-between;
  cursor: pointer;
  margin-bottom: 1px;
  font-size: 26px;
  font-weight: normal;
  background: #303030;
  padding: 0.8em 1.2em 0.8em 1.2em;
  user-select: none;
  align-items: center;
  img {
    filter: brightness(0) invert(1);
    width: 24px;
    user-select: none;
    @media (max-width: 600px) {
      width: 16px;
    }
  }
`;
export const Body = styled.div`
  font-size: 26px;
  font-weight: normal;
  line-height: normal;
  background: #303030;
  white-space: pre-wrap;
  user-select: none;
  overflow: hidden;
  &.closed {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25ms cubic-bezier(0.5, 0, 0.1, 1);
  }
  &.open {
    max-height: 0px;
    transition: max-height 0.25ms cubic-bezier(0.5, 0, 0.1, 1);
  }
  span {
    display: block;
    padding: 0.8em 2.2em 0.8em 1.2em;
  }
`;

Let’s start building our accordion component. In the accordion.js file, let’s add the following code:

import React, { useState, useContext, createContext } from "react";
import {
  Container,
  Inner,
  Item,
  Body,
  Frame,
  Title,
  Header
} from "./accordion.styles";

Above, we are importing the useState, useContext and the createContext hooks which will help us to build our accordion component using compound components.

The React documentation explains that context helps provide a way to pass data through the component tree without having to pass props down manually at every level.

Looking at what we have imported earlier in our accordion.js file, you will notice that we also imported our styles as components which will help us build our components faster.

We will go ahead and create our context for the component which will share data with the components that need them:

const ToggleContext = createContext();
export default function Accordion({ children, ...restProps }) {
  return (
    <Container {...restProps}>
      <Inner>{children}</Inner>
    </Container>
  );
}

The Container and the Inner components from the above code snippet are from our ./accordion.styles.js file in which we created styles for our components using the styled-components (from the css-in-js library). The Container component houses the whole Accordion we are building by using compound components.

Here we are creating a context object using the createContext() method, so when React renders a component that subscribes to this Context object, it will read the current context value from the closest matching Provider above it in the tree.

Then we are also creating our base component which is the Accordion; it takes the children and any restProps. This is our parent component which houses the children components of the Accordion.

Let’s create other children components within the accordion.js file:

Accordion.Title = function AccordionTitle({ children, ...restProps }) {
  return <Title {...restProps}>{children}</Title>;
};
Accordion.Frame = function AccordionFrame({ children, ...restProps }) {
  return <Frame {...restProps}>{children}</Frame>;
};

Notice the . after the parent Accordion component; this is used to connect the child component to its parent component.

Let’s continue. Now add the following to the accordion.js file:

Accordion.Item = function AccordionItem({ children, ...restProps }) {
  const [toggleShow, setToggleShow] = useState(true);
  return (
    <ToggleContext.Provider value={{ toggleShow, setToggleShow }}>
      <Item {...restProps}>{children}</Item>
    </ToggleContext.Provider>
  );
};
Accordion.ItemHeader = function AccordionHeader({ children, ...restProps }) {
  const { isShown, toggleIsShown } = useContext(ToggleContext);
  return (
    <Header onClick={() => toggleIsShown(!isShown)} {...restProps}>
      {children}
    </Header>
  );
};
Accordion.Body = function AccordionHeader({ children, ...restProps }) {
  const { isShown } = useContext(ToggleContext);
  return (
    <Body className={isShown ? "open" : "close"}>
      <span>{children}</span>
    </Body>
  );
};

So here we are creating a Body, Header and Item component which are all children of the parent component Accordion. This is where it might start to get tricky. Also, notice that each child component created here also receives a children prop and restprops.

From the Item child component, we initialized our state using the useState hook and set it true. Then also remember that we created a ToggleContext at the top level of accordion.js file which is a Context Object, and when React renders a component that subscribes to this Context object, it will read the current context value from the closest matching Provider above it in the tree.

Every Context object comes with a Provider React component that allows consuming components to subscribe to context changes.

The provider component accepts a value prop to be passed to consuming components that are descendants of this provider, and here we are passing the current state value which is the toggleShow and method to set the value of the current state setToggleShow. They are the value that determines how our context object will share state around our component without prop drilling.

Then in our header child component of the Accordion, we are destructing the values of the context object, then changing the current state of the toggleShow on click. So what we are trying to do is to hide or show our accordion when the Header is clicked on.

In our Accordion.Body component, we are also destructing the toggleShow which is the current state of the component, then depending on the value of toggleShow, we can either hide the body or show the contents of the Accordion.Body component.

So that’s all for our accordion.js file.

Now this is where we get to see how everything we have learned about Context and Compound components come together. But before that, let’s create a new file called data.json and paste the content below into it:

[
  {
    "id": 1,
    "header": "What is Netflix?",
    "body": "Netflix is a streaming service that offers a wide variety of award-winning TV programs, films, anime, documentaries and more – on thousands of internet-connected devices.\n\nYou can watch as much as you want, whenever you want, without a single advert – all for one low monthly price. There’s always something new to discover, and new TV programs and films are added every week!"
  },
  {
    "id": 2,
    "header": "How much does Netflix cost?",
    "body": "Watch Netflix on your smartphone, tablet, smart TV, laptop or streaming device, all for one low fixed monthly fee. Plans start from £5.99 a month. No extra costs or contracts."
  },
  {
    "id": 3,
    "header": "Where can I watch?",
    "body": "Watch anywhere, anytime, on an unlimited number of devices. Sign in with your Netflix account to watch instantly on the web at netflix.com from your personal computer or on any internet-connected device that offers the Netflix app, including smart TVs, smartphones, tablets, streaming media players and game consoles.\n\nYou can also download your favorite programs with the iOS, Android, or Windows 10 app. Use downloads to watch while you’re on the go and without an internet connection. Take Netflix with you anywhere."
  },
  {
    "id": 4,
    "header": "How do I cancel?",
    "body": "Netflix is flexible. There are no annoying contracts and no commitments. You can easily cancel your account online with two clicks. There are no cancellation fees – start or stop your account at any time."
  },
  {
    "id": 5,
    "header": "What can I watch on Netflix?",
    "body": "Netflix has an extensive library of feature films, documentaries, TV programs, anime, award-winning Netflix originals, and more. Watch as much as you want, any time you want."
  }
]

This is the data we will be working with in order to test our accordion component.

So let’s keep going. We are almost through and I believe you have learned a lot from following this article.

In this section, we are going to bring together everything we have been working on and learning about compound components to be able to use it in our App.js file to use the Array.map function to display the data we already have on the web page. Also notice that there was no use of state within the App.js; all we did was pass down data to the specific components and Context API took care of every other thing.

Now on to the final part. In your App.js, do the following:

import React from "react";
import Accordion from "./components/Accordion";
import faqData from "./data";
export default function App() {
  return (
    <Accordion>
      <Accordion.Title>Frequently Asked Questions</Accordion.Title>
      <Accordion.Frame>
        {faqData.map((item) => (
          <Accordion.Item key={item.id}>
            <Accordion.Header>{item.header}</Accordion.Header>
            <Accordion.Body>{item.body}</Accordion.Body>
          </Accordion.Item>
        ))}
      </Accordion.Frame>
    </Accordion>
  );
}

In your App.js file, we imported our Compound Component Accordion from the file path, then also imported our dummy data, mapped through the dummy data in order to get the individual items in our data file, then displayed them in accordance with the respective component, also you would notice that all we had to do was to pass the children to the respective component, the Context API takes care of ensuring that it reaches the right component and there was no prop drilling.

This is what our final product should look like:

Alternative To Compound Components

An alternative to using compound components would be to make use of the Render Props API. The term Render Prop in React refers to a technique for sharing code between React components using a prop whose value is a function. A component with a render prop takes a function that returns a React element and calls it instead of implementing its own render logic.

To pass data from a component down to a child component that needs the data may result to prop drilling when you have components nested within each other. This is the advantage of using Context to share data between components over using the render prop method.

Conclusion

In this article, we learned about one of the advanced patterns of React which is the compound component pattern. It’s an awesome method to build reusable components in React by using the compound component pattern to build your component offers you a lot of flexibility in your component. You can still opt to make use of Render Prop if flexibility is not what your component requires at the moment.

Compound components are most helpful in building design systems. We also went through the process of sharing the state within the components using the Context API.

  • The code for this tutorial can be found on Codesandbox.

23 Best WordPress Themes for Fashion Blogs

Are you looking for the best WordPress themes for fashion blogs?

Traditional WordPress themes are often designed for businesses and personal blogs. They will often lack the style you want to see from a fashion website.

In this article, we will share some of the best WordPress themes for fashion blogs, websites, and online magazines.

Best WordPress Themes for Fashion Blogs

Building a Fashion Blog with WordPress

WordPress is the most popular website builder on the market. Many top brands use WordPress for its ease of use and flexibility.

There are two types of WordPress. They are WordPress.com, which is a hosted solution, and WordPress.org, also known as self-hosted WordPress. Take a look at our guide on WordPress.com vs WordPress.org for more details.

For your fashion website or blog, you need to use self-hosted WordPress.org. This gives you access to all of WordPress’s features and functionality straight out of the box.

You will also need a domain name and web hosting account. A domain name is your site’s address on the web, like wpbeginner.com. Web hosting is the storage for all your website files.

We recommend using Bluehost as your web host. They are one of the largest hosting companies in the world and an officially recommended WordPress hosting provider.

For WPBeginner readers, Bluehost offers a free domain name, a free SSL certificate, and a HUGE discount on web hosting.

The Bluehost special offer for WPBeginner readers

After purchasing web hosting, you should follow our step by step guide on how to make a fashion blog from scratch.

Now, let’s take a look at some of the best WordPress themes for fashion blogs that you can use on your website.

1. Astra

Astra's Fashion Lifestyle template

Astra is a user-friendly multipurpose theme that has a gorgeous set of over 100 templates that you can use for your blog. The Fashion Lifestyle blog template is perfect for any fashion blogger. It will showcase your photos and content to great effect.

With Astra, you can easily customize exactly how your blog looks. You can change colors, fonts, layouts, and more so that your site is the perfect match for your brand and personality. Plus, Astra is designed for great WordPress SEO. This helps to make your site more visible in Google and other search engines, so you can get more visitors.

2. OceanWP

OceanWP Fashion Blog theme

OceanWP is a classic WordPress multipurpose theme suitable for creating any type of website. It comes with lots of free and paid demo content that you can import in 1-click to set up your fashion or lifestyle blog.

The theme offers lots of customization options, giving you control over colors, font, background, header, footer, sidebar, and more. It also offers custom widgets to extend the functionality of your fashion blog.

3. Divi

Divi Fashion Blog theme

Divi is a powerful WordPress theme designed to empower your fashion website or blog. It provides hundreds of ready-made blog layouts and page templates that you can use as you need.

The Divi fashion blog template is super attractive and offers unlimited color options. With the built-in page builder, it’s easy to customize and add content to your blog pages.

Like Astra, Divi is SEO friendly to help your site rank well in search engines. As well as all the built-in elements, you can add premium 3rd party features such as a carousel module.

4. Hestia Pro

Hestia Pro

Hestia Pro is a super flexible WordPress fashion blog theme. It comes with single-page and multi-page layouts, creating a great user experience.

The theme is compatible with all major drag and drop page builders, including Elementor Pro, Brizy, Visual Composer, and more. It’s easy to customize and set up even for absolute beginners.

Hestia Pro is retina ready and uses responsive design, so your site will look great on computers and on mobile devices.

5. Gallery Pro

Gallery Pro

Gallery Pro is an elegant WordPress theme for photography and fashion blogs. It features your logo on top followed by a navigation menu, header image, and then your most important content.

It includes custom page templates, multiple widget-ready areas, theme customizer support, and more. Gallery Pro is highly optimized for speed and performance.

StudioPress is now part of WP Engine, the most popular managed WordPress hosting company. You can get this theme and all 35+ other StudioPress themes when you sign up for WP Engine hosting to build your website.

Bonus: WPBeginner users also get an additional 20% OFF. Get started with WP Engine today!

6. Shoppe

Shoppe

Shoppe is a highly customizable WordPress theme for fashion websites and building an online store.

It ships with an integrated drag and drop page builder and multiple ready-made designs that you can use as a starting point. It includes beautiful photo galleries, sliders, multiple navigation menu styles, and more.

7. Løge

Løge

Løge is a beautiful eCommerce WordPress theme designed particularly for fashion and lifestyle websites. It features a gorgeous shop front, customizable blog, and archive pages, and flexible design options.

It supports all page builder plugins, which allows you to create your own landing pages as well. It has beautiful templates for photo galleries, a contact form, and full width pages.

8. Pepper+

Pepper+

Pepper+ is an all-purpose WordPress theme with a modular approach to design. You need to drag and drop modules to create stunning page layouts on your own. It also includes several ready-made website designs that you can import in 1-click.

Pepper+ includes features like contact form support, Google fonts, Google Maps, WooCommerce support, pricing tables, and more. It’s flexible enough to be used as a simple traditional blog, as a fully-fledged online store, or as a membership website.

9. Stack

Stack

Stack is a unique WordPress theme with a modern design. It features bold colors, a grid layout, and beautiful animations. It’s well suited for all kind of content blogs, and its design makes it highly suitable for fashion and lifestyle websites.

On top of that, Stack has a portfolio section, beautiful image galleries, and complete WooCommerce support. It has a custom theme options panel with a 1-click demo data importer for quicker setup.

10. The Styler

The Styler

The Styler is a fashion blog WordPress theme for fashion, beauty, health, and fitness websites. It features a unique homepage design with a sticky navigation menu and a fullscreen header image on top.

The Styler has templates to use for your blog page, full-width page, and landing pages. It includes support for multiple colors, custom widgets, social media icons, and WooCommerce.

11. Neve

Neve

Neve is a gorgeous WordPress all-purpose theme. It comes with a beautiful fashion blog template suitable for any fashionista. This template has a lot of white space that makes your content highly readable.

Neve comes with eye-catching color choices and attractive font styles that make your fashion blog look amazing. Neve supports WooCommerce straight out of the box.

12. Peak

Peak

Peak is an elegant WordPress theme for photographers, fashion designers, artists, and other creative professionals. Its homepage has a beautiful masonry tiles layout, which can automatically populate tiles from your posts.

This theme offers a built-in portfolio post type, mega menus, slide-out widgets, page title banner, custom 404 error page, and full WooCommerce support.

13. Salon

Salon

Salon is a beautifully designed WordPress theme suitable for fashion blogging, spas, and beauty salons. It has an elegant layout for the homepage with a fullscreen slider on top.

It comes in multiple color schemes and allows you to use a different color scheme for each page. Inside, you will also find custom widgets for social media, contact information, and content discovery. Salon is eCommerce ready and can be used with all the top WordPress page builders.

14. Envy

Envy

Envy is a stylish and free WordPress theme suitable for any fashion store or lifestyle blog, especially if you’re on a bootstrap budget. This beautifully designed WordPress theme features a 3 column grid layout to display your content.

Envy also includes social media buttons, fullscreen search overlay, page templates for your blog, archives, and full-width pages, multiple sidebars, and more. It’s easy to use and requires very little time to setup.

15. Ultra

Ultra

Ultra is a multi-purpose mega theme for WordPress. It has multiple ready-made website designs that you can install in 1-click, including demo data. You can use its intuitive drag and drop page editor to design your content.

It comes with Google Maps, contact forms, pricing tables, timelines, animated counters, progress bars, and more. It has multiple layout options that you can use with your own colors and custom widgets.

16. Balance

Balance

Balance is a well-crafted WordPress theme for any kind of business or professional website. This eCommerce ready theme features a full-width slider on top with your call to action on the homepage, followed by different sections of your website.

Balance is a great choice of theme for any site in the fashion industry. It can be styled in any way imaginable. It ships with multiple color schemes, and you can also create your own colors if needed. The theme setup is simple and beginner-friendly.

17. Elegant

Elegant

Elegant is a minimalist style WordPress theme suitable for fashion and lifestyle blogs. It uses elegant typography with beautiful photo galleries that make your content stand out.

It has a built-in portfolio section with a beautiful masonry grid layout to display portfolio items. It comes with multiple header styles, templates, layout choices, team members, and a 1-click demo installer for quicker setup.

18. Indigo

Indigo

Indigo is an excellent, well-crafted WordPress theme suitable for fashion blogs, boutiques, and fashion magazines. This super flexible WordPress theme comes with 15 ready-made website designs that can be installed with 1-click.

Indigo uses modules to build layouts so you can drag and drop a module to add it or remove any existing module that you don’t want. It’s easy to set up and use, and you will love its attention to detail.

19. Neto

Neto

Neto is a WooCommerce ready WordPress theme suitable for fashion blogs, boutiques, and fashion accessories. It features a clean design with a uniquely engaging homepage. It comes with built-in support for all popular page builder plugins.

Neto has a custom theme options panel for easier setup. You can also use the customization options in the live customizer, which gives you full control over colors, layouts, widgets, and more.

20. Velure

Velure

Velure is a beautiful magazine style WordPress theme for fashion blogs. It comes with a beautiful Instagram slideshow on the top, followed by your social media buttons to help you gain more followers. Below that, it has a featured slider, which is followed by a 3-column widget ready area.

Velure comes with custom widgets for an Instagram feed, latest Tweets, social icons, featured categories, newsletter subscription form, and more. It’s also WooCommerce ready and includes beautiful templates for product pages.

21. Paperbag

Paperbag

Paperbag features a clean minimalist layout for a fashion blog or magazine website. Behind this simplicity, there are tons of options (80+ options in the theme customizer alone) to fine-tune every aspect of your website.

Paperbag includes multiple layouts, several sidebars, custom widgets, and a flexible homepage layout. It’s tested with all the best WordPress plugins and works effortlessly with popular page builders.

22. Didi

Didi

Didi is an excellent WordPress theme for fashion blogs looking for an elegant and minimalist design. This beautiful theme comes with multiple homepage layouts, page templates, widget areas to add widgets and shortcodes, and more. All the theme options are available under the live customizer for easier setup.

It also includes full support for page builders and WooCommerce. You can use Didi with multilingual websites as it’s translation ready using WPML.

23. Cressida

Cressida

Cressida is a beautifully designed WordPress theme for online fashion brands, lifestyle, and personal websites. It features a clean and elegant design with a focus on readability and user experience.

It comes with a dedicated front page, with featured posts, highlight posts, posts strip, a promo category, and multiple header and footer widgets. It also supports a posts slider, banner, or slider with a sidebar on the front page.

We hope this article helped you find the best WordPress themes for fashion blogs. You may also want to check out our guide on the best ways to make money online blogging with WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post 23 Best WordPress Themes for Fashion Blogs appeared first on WPBeginner.

Node.js app to create login

var mysqlstore = require('express-mysql-sessiion');
var app = module.exports = express();
var express = require('express');
var session = require('express-session');
var bodyParser = require('body-parser'); 
var path = require('path');


var connection = mysql.createConnection({
host:'localhost',
user:'root',
password:'',
databse:'mam_login'
});     

var app = express();

Good day all
My code is giving me error: "can not find module 'express-mysql-session'
can someone please assist