wcpos / core

Shared react components for the cross-platform WooCommerce POS client.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Core React-Native Components for WooCommerce POS

NPM Tests Hooks docs Discord chat

About  —  Structure  —  Workflows  —  How to use it

💡 About

This repository contains the core React-Native components used in the cross-platform WooCommerce Point-of-Sale application.

📁 Structure

Disclaimer: The folder structure may change over time.

The folder structure is designed to segregate concerns while maintaining modularity and readability. It primarily consists of:

  • /src
    • index.tsx - root component
    • /contexts - context providers for state management
    • /hooks - shared hooks that contain business logic and UI helpers
    • /screens - contains various screen sub-folders, each representing a 'screen'
      • index.tsx - route navigator component
      • /components - shared components
      • /screen-1-folder -
        • index.tsx - route navigator component
        • /components - shared components
        • /contexts - context providers for state management
        • /hooks - shared hooks that contain business logic and UI helpers
        • /sub-screen-folder
          • index.tsx
          • ...
      • /screen-2-folder
        • ...

Simplifed, we have:

  • navigator
  • /components
  • /contexts
  • /hooks
  • /sub-folder
    • navigator
    • /components
    • /contexts
    • /hooks
    • /sub-folder
      • navigator
      • ...

👷 Workflows

Prerequisites

Clone and install dependencies

git clone https://github.com/wcpos/core.git wcpos-core
cd wcpos-core
yarn install

Running tests

 yarn test

🚀 How to use it

This repository contains only the core components and will not build a complete, renderable project. To build the complete project, you should clone the monorepo.

About

Shared react components for the cross-platform WooCommerce POS client.


Languages

Language:TypeScript 99.5%Language:JavaScript 0.3%Language:HTML 0.2%