You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build interactive Slack apps without webhooks or JSON headache. If you know React, you know how to make a Slack app.
Quick start
Create your message with React:
importrandomImagefrom"../utils";exportfunctionRandomImage({ useState }: PheliaMessageProps){const[imageUrl,setImageUrl]=useState("imageUrl",randomImage());return(<Messagetext="Choose a dog"><ImageBlocktitle="an adorable :dog:"alt="a very adorable doggy dog"imageUrl={imageUrl}emoji/><Divider/><Actions><Buttonstyle="primary"action="randomImage"onClick={()=>setImageUrl(randomImage())}>
New doggy
</Button></Actions></Message>);}
Phelia transforms React components into Slack messages by use of a custom React reconciler. Components (with their internal state and props) are serialized into a custom storage. When a user interacts with a posted message Phelia retrieves the component, re-hydrates it's state and props, and performs any actions which may result in a new state.
Components
Each component is a mapping of a specific object type for a slack block.
There are 3 categories of components, each with special rules for how that component can be used with other components.