@bigbinary/neeto-commons-frontend
v4.12.3
Published
A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.
Downloads
21,560
Readme
neeto-commons-frontend
A library that packages common boilerplate frontend code necessary for all neeto products.
Category
Name
Initializers ↗
- Set up axios
- Set up globalProps
- Set up translations
- Set up logger
- Disable React Developer Tools in production
- Set up mixpanel
React utilities ↗
- useDebounce
- useFuncDebounce
- usePrevious
- useUpdateEffect
- useLocalStorage
- useOnClickOutside
- useFieldSubmit
- useKeyboardShortcutsPaneState
- useDisplayErrorPage
- useErrorDisplayStore
- useTimer
- useRegisterNavigationCheckpoint
- useNavigationCheckpoints
- useRestoreScrollPosition
- useRemoveNavigationCheckpoint
- useMutationWithInvalidation
- useFetchNeetoApps
- usePersistedQuery
- useIsElementVisibleInDom
- useStateWithDependency
- useQueryParams
- useBreakpoints
- PrivateRoute
- AppContainer
- QueryClientProvider
- HoneybadgerErrorBoundary
- withImmutableActions
- withTitle
- registerBrowserNotifications
- destroyBrowserSubscription
- handleMetaClick
- isMetaKeyPressed
- withT
Pure utility functions ↗
Moved into @bigbinary/neeto-cist
Web utility functions ↗
- withEventTargetValue
- getSubdomain
- simulateApiCall
- copyToClipboard
- buildUrl
- dateFormat
- dayjs
- toLocale
- getQueryParams
- joinHyphenCase
- hyphenize
- debounce
- hasPermission
- hasAnyPermission
- hasAllPermissions
- createSubscription
- getFromLocalStorage
- setToLocalStorage
- removeFromLocalStorage
- currencyFormat
- showThumbsUpToastr
- captureAnalyticsEvent
- captureAnalyticsPageView
- buildNestedAttributesPayload
- loadGoogleFonts
Installation Instructions
Install from npm:
yarn add "@bigbinary/neeto-commons-frontend@latest"
This package relies on the host project's tailwind configuration. So add neeto-commons-frontend to your project's tailwind.config.js file:
module.exports = {
purge: {
content: [
// ... other content directories
"./node_modules/@bigbinary/neeto-commons-frontend/**/*.js",
],
},
// ... other tailwind config options
};
Usage
This package exports five different sets of functions and components. Click on them to read more:
Other references
Testing using yalc
All our build files are in dist
folder, so when you publish make sure to pass
the dist dir
yalc publish dist