Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here


Statistics on realm

Number of watchers on Github 177
Number of open issues 3
Main language JavaScript
Average time to merge a PR less than a minute
Open pull requests 0+
Closed pull requests 0+
Last commit almost 4 years ago
Repo Created almost 4 years ago
Repo Last Updated over 1 year ago
Size 19 KB
Organization / Authoracdlite
Contributors1
Page Updated
Do you use realm? Leave a review!
View open issues (3)
View realm activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating realm for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

Realm

A total rip-off of the Elm Architecture, in React.

Realm components are React components, so they are interoperable with non-Realm components. Use Realm for your entire app, or just in specific places.

One way to think of it is as nested Redux. Each Realm component is its own mini-Redux app, which can be composed of other Redux apps.

import { realm, forward } from 'react-realm'

const INCREMENT = 'INCREMENT'
const DECREMENT = 'DECREMENT'

const init = (initialCount = 0) => initialCount

  // This is a reducer, like Redux
const update = (count, action) => {
  switch (action.type) {
  case INCREMENT:
    return count + 1
  case DECREMENT
    return count - 1
  default
    return count
}

// This is just a stateless functional React component
// Any React component (including a class) is valid
const view = ({ model, dispatch }) =>
  <div>
    Count: {model}
    <button onClick={() => dispatch({ type: INCREMENT })>+</button>
    <button onClick={() => dispatch({ type: DECREMENT })>-</button>
  </div>

// Either compose with other Realm components, or use `start()`
const CounterApp = start({
  model: init(),
  update,
  view
})

ReactDOM.render(<CounterApp />)

See also Realm Redux, which enables the use of Redux extensions with Realm components.

Why you should use this library

  • You think Elm is awesome, but are stuck writing JavaScript for various practical reasons
  • You like functional programming
  • You like Redux, and want access to its huge ecosystem of extensions and resources

Why you shouldn't use this library

  • Because you should use Elm instead
  • Because it's in extreme alpha and not yet ready for public use. I intend to get it ready in time for my React Conf talk on February 23.

Note that while Realm is an implementation of the Elm Architecture, it does not and cannot claim to replicate the entirety of Elm the language.

Docs in progress / non-existent until the library is ready. In the meantime, see this test for an example.

realm open issues Ask a question     (View All Issues)
  • about 3 years Pin to 0.16 Elm Arch
  • over 3 years Still a WIP?
  • almost 4 years Allow stateless view component
realm questions on Stackoverflow (View All Questions)
  • Optimised way of accessing Realm values
  • io.realm.exceptions.RealmMigrationNeededException: Primary key not defined for field 'groupId' in existing Realm file. Add @PrimaryKey
  • Save Data in Backendless after saving in realm database
  • Can Realm be used as a persistence model to represent a CloudKit public database?
  • Realm framework too large
  • Error: Object has been deleted or invalidated. (Realm)
  • Realm for Android: Store a non-RealmObject inside a RealmObject one
  • Does React Realm Native DB support encryption/description
  • Can HTTP WWW-Authenticate realm attribute correspond to JWT aud (audience) claim?
  • Apache Shiro Realm Configuation
  • Realm and getter not associated to a field
  • How to pass realm in AutobahnConnection android?
  • Use Realm for filtering and sorting nearby locations
  • Handling realm query in async task
  • Object being replaced instead of updating in Realm Objective C
  • Realm do a IN query in android
  • Realm object property misses its value, but I can see it when printing the whole object
  • Problems running Realm: Could not find io.realm:realm-gradle-plugin:0.88.0-SNAPSHOT
  • How to make or implement self relationship in realm database?
  • How to use web.xml to define security realm / jaas domain
  • Getting started with realm ReactExample - Error no such file GCDWebServerRequest.m?
  • Realm Error : Migration
  • How to set the "realm" using PHP OAuth?
  • Realm shows error that cannot find symbol class JsonReader Error in the proxy class
  • Realm data access
  • Changing the realm object crash the app
  • There is an "and" clause on Realm Java?
  • Is it possible to use "Group by" concept in Realm mobile database
  • Realm backed RecyclerView Showing Null Data
  • Realm data not showing in table view
realm list of languages used
Other projects in JavaScript