0.1.5 • Published 2 years ago

serhant-tools v0.1.5

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Detailed documentation: https://alex-oleks.github.io/sgpt-docs/

Package Name: serhant-react-tools

Description: The serhant-react-tools npm package is a collection of reusable components, providers, custom hooks, utility functions, and service classes designed to empower real estate agents and enhance their daily workflows within Serhant applications. Built as an integral part of the Serhant GPT React application ecosystem, this package is a valuable resource for developers working on Serhant projects.

Features:

  • Components: A diverse set of React components tailored to the needs of real estate agents, including property listings, client management, and interactive maps.

  • Providers: Data providers that seamlessly integrate with Serhant's backend systems, making it easy to fetch and display essential real estate data.

  • Custom Hooks: Reusable hooks for handling common state management and side-effects, reducing boilerplate code and accelerating development.

  • Utilities: A collection of utility functions to simplify tasks such as data formatting, validation, and authentication.

  • API (Service Classes): High-level service classes for interacting with Serhant APIs, encapsulating complex functionality and promoting clean, modular code.

Getting Started:

To incorporate serhant-react-tools into your React application, follow these simple steps:

1. Installation:

Install the package using npm:

npm install serhant-react-tools

or

  yarn add serhant-react-tools

2. Usage:

Import and utilize the package components, hooks, and utilities in your React application:

App.jsx;

import React from 'react';
import { MainPageProvider } from 'serhant-react-tools/providers';
import { RoomApi } from 'serhant-react-tools/API';

function MyRealEstateApp({ children }) {
	const allListings = RoomApi.getRoomsPost({ filterOptions: null, regions: [], showOnlyAgentListings: false });
	// .. do something with allListings if it is needed

	return <MainPageProvider>{children}</MainPageProvider>;
}

export default MyRealEstateApp;
MainPage.jsx;

import React from 'react';
import { RoomMainListItem } from 'serhant-react-tools/components';
import { useMainPageProvider } from 'serhant-react-tools/hooks';
import { someUtil } from 'serhant-react-tools/Utils';

function MainPage({ children }) {
	// get needed data from a provider
	const { rooms, totalListings } = useMainPageProvider();

	return (
		<>
			<h1>Total listings: {totalListings}</h1>
			<div>
				{rooms.map((room) => (
					<RoomMainListItem
						room={room}
						key={room.Id}
					/>
				))}
			</div>
		</>
	);
}

export default MainPage;

Customize and extend your application with serhant-react-tools components and logic to create a powerful real estate platform tailored to your needs.

Important Note: Ensure you have the necessary credentials and configurations for Serhant APIs and services for seamless integration. Refer to the package documentation for detailed usage instructions and examples.

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago