0.0.5 • Published 8 months ago

@taitrd/next v0.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

NextJs and ReactJs packages

Requirement

  • Typescript
  • NextJs >= 11
  • NodeJs >= 14

Content

  • Type definitions
    • HttpLoaderContent
      export type HttpLoaderContent = {
          scope?: string
          action: HttpLoaderAction
          data: any
      }
  • Utils

    • event-fns
    • image-loader
    • object-fns
    • string-fns
    • renderHtml
  • Behaviors

      // create new instance
      import { createEventSubject } from '@texodesign/next/behaviors/http-loader'
      const subject = createEventSubject<'http-loader'>()
      export default subject
      
      // or single instance
      import subject from '@texodesign/next/behaviors/http-loader';
      export default subject
  • Create NextJs api handler or page props examples

      import {
          createApiHandler,
      } from '@texodesign/next/lib'
    
      import getProductCategories from './get-category'
      import postProductCategories from './post-category'
    
      export const handlers = {
          getProductCategories,
          postProductCategiries,
          //etc
      }
    
      const productCategoryDetailApi = createApiHandler({
          handlers,
          middlewares,
      })
    
      export default productCategoryDetailApi 
      import {
          createPageProps
      } from '@texodesign/next/lib'
    
      import getProducts from './get-products'
    
      export const handlers = {
          getProducts
      }
    
      const shopSearchPageProps = createPageProps({
          handler,
          handlers,
          middlewares,
      })
    
      export default shopSearchPageProps 
0.0.5

8 months ago

0.0.4

9 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago