Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

createEagerElement #180

Merged
merged 2 commits into from
May 21, 2016
Merged

createEagerElement #180

merged 2 commits into from
May 21, 2016

Conversation

acdlite
Copy link
Owner

@acdlite acdlite commented May 21, 2016

Internally, we've been using a special version of React.createElement that checks if a functional component is "referentially transparent" and returns its output, rather than creating a React element. Let's call this createEagerElement and expose it as a public API.

We were also using a function called internalCreateElement that acts like a curried form of (what is now called) createEagerElement. This has a slight optimization, which is to avoid checking for referential transparency each time its used. I couldn't think of a good name at the time, but it's actually just a factory in React parlance. We'll call this createEagerFactory.

@acdlite acdlite merged commit 390697a into master May 21, 2016
@acdlite acdlite deleted the createEagerElement branch May 21, 2016 04:47
istarkov pushed a commit that referenced this pull request Oct 31, 2016
* Fix mapPropsStream's example

It seems like in the docs, `Observable` refers to `Rx.Observable`.

In Rx4 and Rx5, `Rx.Observable.interval` emits numbers, not objects.

* Advertise `withProps`

* Clean-up some comments

* Fix links to the React documentation

* Improve renderComponent's doc

Since faaafb0 (#227), branch's third argument defaults to the identity
function. This is a nice addition and we probably want to advertise it
in renderComponent's doc.

* Remove dead code

Since 390697a (#180, 2016-05-21), branch()'s `{Left,Right}Component`
internal instance variables are not used anymore.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant