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
{{ message }}
Repository navigation
Commit f872490
Browse filesBrowse the repository at this point in the historyBrowse files
Pre-81: Switch to newer rendering pathways for stagedRender and improve type safety of framework (#3996)
* update phasedComponent pattern and switch direct stagedComponent callers to use it
* Change files
* fix use-slot to use new rendering patterns
* Change files
* tighten up typing for framework, fixing the resulting errors
* Change files
* fix break from merge
* add prop extraction helper and remove hack from switch
* fix package linting error
* fix useSlot implementation
* fix overflow rendering
* ensure old codepaths are consistent in behavior
* update framework-base documentation and fix logic bug
* fix dead links in markdown files
* Change files
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ This guide assumes you:
6
6
7
7
- Have read through the [React Native Docs](https://reactnative.dev/docs/getting-started). In particular:
8
8
- Understand classes vs function components (we use the latter) and [hooks](https://reactjs.org/docs/hooks-intro.html). Here's a good [video](https://www.youtube.com/watch?v=dpw9EHDh2bM) that explains function components and hooks for traditional OOP developers.
- Have a local fork of FluentUI React Native and have run the test app.
11
11
12
12
## Understanding the Repository Structure
@@ -44,7 +44,7 @@ Tokens help us achieve simpler customization for complex higher order components
44
44
45
45
This section covers creating and adding a new component package to FluentUI React Native's monorepo. If you are instead working on an existing component and adding a native module, skip to the next two sections.
46
46
47
-
Most components should use the compose framework as it offers the comprehensive set of patterns like tokens and slots, but if you're creating a simple component that doesn't require those patterns, there's a lighter pattern called [stagedComponent](./packages/framework/use-slot/src/stagedComponent.ts). The stagedComponent pattern splits up the render function into two stages. Stage 1 handles building props and hook calls (best to separate the hook calls from the render tree since they rely on call order). Stage 2 returns the actual element tree, any conditional branching should happen here (Icon is a good example of using stagedCompoenent).
47
+
Most components should use the compose framework as it offers the comprehensive set of patterns like tokens and slots, but if you're creating a simple component that doesn't require those patterns, there's a lighter pattern called [stagedComponent](./packages/framework-base/src/component-patterns/stagedComponent.ts). The stagedComponent pattern splits up the render function into two stages. Stage 1 handles building props and hook calls (best to separate the hook calls from the render tree since they rely on call order). Stage 2 returns the actual element tree, any conditional branching should happen here (Icon is a good example of using stagedCompoenent).
48
48
49
49
1. Create a new directory in of these two locations, depending on your component:
50
50
@@ -82,7 +82,7 @@ Reach out to Samuel Freiberg with any questions related to E2E testing.
82
82
83
83
## Adding native code to your new component
84
84
85
-
Through the power of [Native Modules](https://reactnative.dev/docs/0.74/native-modules-intro), we are able to create components that are comprised of native platform code, rather than JS. This is particularly useful if you want platform specific behavior, or if you want a component that feels much more aligned to it's specific platform. The downside is you must implement the Native module for every platform you wish to support. It's worth investigating whether you truly need a native module, or if a more cross platform JS implementation is the better approach.
85
+
Through the power of [Native Modules](https://reactnative.dev/docs/turbo-native-modules-introduction), we are able to create components that are comprised of native platform code, rather than JS. This is particularly useful if you want platform specific behavior, or if you want a component that feels much more aligned to it's specific platform. The downside is you must implement the Native module for every platform you wish to support. It's worth investigating whether you truly need a native module, or if a more cross platform JS implementation is the better approach.
86
86
87
87
There are a few caveats to know of adding a native module to a FluentUI React Native component:
0 commit comments