-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reorg tests for fiber and stack versions (#23)
- Loading branch information
Showing
6 changed files
with
83 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,33 @@ | ||
# It begins | ||
# Tiny React Renderer | ||
|
||
> Note that this is currently targeting the **React 16.0.0-alpha.2** release. | ||
Creating a fiber-based React renderer is quite direct, though there are a few | ||
awkward pieces around tooling that will be smoothed over in time. | ||
|
||
Many languages have this concept of a `main`—the entry point to your | ||
application. If you look at any React application code you’ve written you’ll see | ||
that you “start” your app with a call like the following: | ||
|
||
```jsx | ||
// web | ||
ReactDOM.render(React.createElement(MyApp), document.getElementById('app')); | ||
|
||
// native | ||
AppRegistry.registerComponent('MyApp', () => MyApp); | ||
``` | ||
|
||
This is where your application enters into the React domain and comes alive. Your | ||
root React element is instantiated and attached to the host environment. | ||
|
||
With Fiber, all renderers begin (and maybe even end) in the React{Host}Fiber.js | ||
file. | ||
|
||
With that let’s get started. Our tour continues in | ||
[./ReactTinyFiber.js](./ReactxTinyFiber.js)! | ||
|
||
## Work in Progress | ||
|
||
Please note this guide is a work in progress. Much of this knowledge is derived | ||
from my experience in creating [React Hardware](https://github.com/iamdustan/react-hardware). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
'use strict'; | ||
|
||
const render = require('./src/mount'); | ||
const render = require('./mount'); | ||
|
||
module.exports = {render}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"name": "tiny-react-renderer-stack", | ||
"private": true, | ||
"description": "A tiny React stack renderer to demonstrate how to write a renderer.", | ||
"main": "./index.js", | ||
"scripts": { | ||
"test": "node ./test" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/iamdustan/tiny-react-renderer" | ||
}, | ||
"files": [ | ||
"*", | ||
"package.json", | ||
"README.md" | ||
], | ||
"keywords": [ | ||
"react", | ||
"reactjs", | ||
"renderer" | ||
], | ||
"author": "Dustan Kasten <[email protected]>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/iamdustan/tiny-render-renderer/issues" | ||
}, | ||
"homepage": "https://github.com/iamdustan/tiny-render-renderer", | ||
"dependencies": { | ||
"fbjs": "^0.8.4", | ||
"react": "15.3.x" | ||
}, | ||
"devDependencies": {} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters