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
These are the guiding principles used when developing Exo UI.
7
7
8
+
### Remove runtime restrictions
9
+
10
+
We wanted Exo UI to work any where React worked, namely in the browser and on native devices.
11
+
12
+
To do this we had to make sure we never referenced any markup directly, this ended up being an advantage as it forced us to create a library free of semantic restrictions.
13
+
14
+
### Remove semantic restrictions
15
+
16
+
Ever found the perfect third party library that does everything you want only to find out it's a nightmare to move a button or style an input? Us to! Exo UI was designed from the ground up to only ship functionality, no markup and no stylesheets.
17
+
18
+
The draw back of an approach like this is it means Exo UI is limited in terms of it's ability to help with things like accessibility and animations, fortunately lots of great tools exist to help with these.
19
+
20
+
### Remove data restrictions
21
+
22
+
A lot of third party libraries require you to format your data _their_ way, this can be frustrating, if you already have a `slides` array containing objects with `title` and `image` why should you have to change those objects to have `caption` and `background`?
23
+
24
+
Exo UI tries to solve this problem by _wrapping_ around your data and never modifying it directly, this does add some verbosity but also allows Exo UI to be very flexible in terms of the _shape_ of data it consumes.
25
+
26
+
Obviously we do have to make some concesions like expecting an array to be passed to components that iterate over lists, etc...
27
+
8
28
### Single file components
9
29
10
30
You may notice that each component i.e `SingleSelectList` is defined in a single file, including all type definitions.
@@ -20,5 +40,3 @@ The use of memoization in React projects is a [relatively controversial](https:/
20
40
We only utilize memoization when it is strictly required, in otherwords when we intend to include a value or function in the dependency array of another value, effect, or function.
21
41
22
42
If this doesn't make any sense to you don't worry! 99% of the time this shouldn't effect you and should only really be a consideration when contributing directly to the Exo UI source code.
description: A guide in my new Starlight docs site.
2
+
title: Add custom actions
3
+
description: How to extend existing Exo UI functionality
4
4
---
5
5
6
-
Hello world
6
+
Sometimes the functions provided by Exo UI simply aren't enough when dealing with complex business logic.
7
+
8
+
When you want to extend the functions provided by Exo UI we recommend mapping over the data returned from which ever component you are using and adding a new `custom` key to each item.
9
+
10
+
**Note:** While any string will work we recommend `custom` because we considered that key _reserved_ and will never ship any logic that would intefer with that.
0 commit comments