forked from facebook/react
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CS] Implement Some Stuff (facebook#11390)
* Implement CS first take This is using a pure JS API. This should probably switch to native hooks at some later point but I'll start ironing out issues at this level first. * Use async scheduling by default The scheduled callback gets called immediately in render with infinite time for now. Later this will be per root and abortable. * Fix up the type signature of the ReactNativeCSType export * Add escape hatch for special cased children Working around the fact that we can't map arbitrary children slots. Just the "children" prop. * Readd providesModule for ReactNativeCSTypes * Fix lint * Fix ReactNativeTypes providesModule and CI check * Special case a parent instance that doesn't have a props object CSCustom can be anything here. Ugly but whatevs. * Don't forget to store stateUpdater so that we can trigger updates * Fix test
- Loading branch information
1 parent
cc54b6f
commit 696908f
Showing
8 changed files
with
206 additions
and
97 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
14 changes: 14 additions & 0 deletions
14
packages/react-cs-renderer/src/__mocks__/CSStatefulComponent.js
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,14 @@ | ||
/** | ||
* Copyright (c) 2013-present, Facebook, Inc. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
// Mock of the CS Hooks | ||
|
||
exports.CSStatefulComponent = function(spec) { | ||
return spec; | ||
}; |
Oops, something went wrong.