npm packages – react-copy-to-clipboard and object-to-formdata

react-copy-to-clipboard is a simple npm package which provides copy to clipboard functionality. We can do this in pure javascript but it only copies the selected text of a input tag. This this npm package, we can copy any text which is passed to the component as props. object-form-data is a npm package which converts JSON …

NPM package – react-intl

 This library provides React components and an API to format dates, numbers, and strings, including pluralization and handling translations. Features Display numbers with separators. Display dates and times correctly. Display dates relative to “now”. Pluralize labels in strings. Support for 150+ languages. Runs in the browser and Node.js. Built on standards. More details can be …

StoryBook

Storybook is a user interface development environment and playground for UI components. The tool enables developers to create components independently and showcase components interactively in an isolated development environment. Storybook runs outside of the main app so users can develop UI components in isolation without worrying about app specific dependencies and requirements. https://storybook.js.org/ It is …

react-sortable-hoc

react-sortable-hoc is an npm package which provides drag & drop, sort functionality for React components. https://github.com/clauderic/react-sortable-hoc Here is demo and documentation of the package. http://clauderic.github.io/react-sortable-hoc/#/basic-configuration/basic-usage?_k=ws01s2 And here is awesome example which uses this package. https://qed42.github.io/react-redux-reorderable-grid/

Laravel Service Provider

Service providers are the central place of all Laravel application bootstrapping. Your own application, as well as all of Laravel’s core services are bootstrapped via service providers. For more details: https://laravel.com/docs/5.8/providers Default usage of Service Provider is to inject variables to constructor of any class. We can extend this usage, and inject variables conditionally according …

Laravel Concepts – Policy, Event, Listener

There are bunch of advanced Laravel features and we will use them in real-world projects. Policy, Event, Listeners are widely used Laravel features. Laravel Policies are a great way to protect actions on your Eloquent Model. Laravel Policies are the part of Laravel Authorization that helps you to protect resources from unauthorized access. Laravel’s events …

React – Prevent Render when Props and State change

When we change the state or props of the component, render method is called by default. In order to prevent this behavior, we can use shouldComponentUpdate method. If we return false from this method, render is not called. This method receives props and state as parameter so we can check if certain state or props …