Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aweary/react-mood

render components based on the mood of the user
https://github.com/aweary/react-mood

Last synced: about 2 months ago
JSON representation

render components based on the mood of the user

Awesome Lists containing this project

README

        

# react-mood 😀😢

Render components based on the mood of the user.

## Usage

Are you tried of being insensitive to the mood of your users? Do you want to reward to the happy and ignore the sad? `react-mood` lets you build a UI tailored specifically to your user's mood! All you have to is import the `Mood` component from `react-mood` and use the `renderIf` prop to decide which mood is appropriate for your beautiful handcrafted React component.

### Example

```jsx
import React from 'react'
import Mood from 'react-mood'

class AnnoyedAlert extends React.Component {
render() {
return (


Hey there! It looks like you're having an annoying day.
Have you tried adjusting your attitude?



)
}
}
```

`react-mood` gives you full control over babysitting your users where you see fit. Gone are the days of insensitive one-size-fits-all approaches to pandering.

## Installation

`react-mood` is only available on the Yarn registry, npm support has been dropped.

```
yarn add react-mood
```