Conversation
| @@ -1,15 +1,13 @@ | |||
| import * as React from "react"; | |||
There was a problem hiding this comment.
This file is just from the sample, was just fiddling with some things.
| return ( | ||
| <StyleProvider> | ||
| <AppBody /> | ||
| </StyleProvider> | ||
| ); | ||
| return <AppBody />; |
There was a problem hiding this comment.
No more Provider wrapper, woot.
There was a problem hiding this comment.
THE NEXT REDUX!
Jk, this is like the most barebones possible state-management solution. I like it because it's lean, and doesn't require Context.
| /** | ||
| * TODO: Deprecate this. No longer needed, but leaving for now. | ||
| */ | ||
| export const StyleProvider = ({ |
There was a problem hiding this comment.
Can we use the following comment
/**
* @deprecated This provider should not be used
*/| export class SimpleStore<InitialValue, OutputValue = InitialValue> { | ||
| #value!: OutputValue; | ||
| #ee = new SimpleEventEmitter<OutputValue>(); | ||
| #transformer!: (val: InitialValue) => OutputValue; |
There was a problem hiding this comment.
first time ever seeing private class vars in ts
There was a problem hiding this comment.
I just recently started using them, and then realized like half of the class vars I use should be considered private, and I love that there's now an easy way for declaring them as such.
|
Damn, just now seeing that RNW doesn't support I'm torn on this. I really like this change to the API, but not supporting RNW is a real downside. UPDATE!Looks like |
carloskelly13
left a comment
There was a problem hiding this comment.
Just one comment, otherwise looks great.
|
LGTM? 🥇 |
What is this?
This PR removes the need to wrap your app in
StyleProvider. The reason for this change is twofold:This PR also adds a bunch of cleanup around tests.