- #496 Annotate this type for typescript-eslint/unbound-method (Fix #447)
See @fleur/[email protected]
changelog
- Breaking change: Drop ES5 support (Support ES2018~)
@fleur/react
bundle minified! Now it under 1.2kB(gzipped)!- Before this change, @fleur/react bundle is over 2kB(gzipped)
- #322 Breaking change: Drop old version Node.js support (v11, v13)
- Drop testing version matrix, not guaranteed to work
- Internal refactoring (Follow
@fleur/[email protected]
)- ComponentContext now build / cached in Hooks not AppContext
- Bugfix: Expose
depend
props type forwithFleurContext
- ❗important BugFix❗ #314 Fix returning old select value when changes mapStoresToProps
Fixed it!
// Let userId is "1" in first rendering, "2" in next rendering
const { userId } = useParams()
// Expect to return user(id: 1) in first rendering, it works correctly
// 💥WTF💥 Expect to return user(id: 2) in next rendering, but returns user(id: 1)
const user = useStore(getStore => UserSelector.byId(getStore, userId))
- #183 in v3.3.0 was breaking change for component update rule. So bump major version.
- #284 Accept
null
inuseStore
at 2nd argument. It behaves always re-rendering each state update likes v3.2.0.
- #183 Reduce re-rendering when selected value if not changed
- #182 Implement dependency injection
- #177 Add ESM build
-
#160
useStore
andconnectToStores
no longer need to specify listening Store on first argument. Now automaticaly listening store retrieved viagetStore
(includes via selector)// new const { count } = useStore(getStore => ({ count: getCount(getStore) })) // past const { count } = useStore([CounterStore], getStore => ({ count: getCount(getStore), }))
- Package name changed to
@fleur/react
StoreGetter
type removed and moved to@fleur/fleur
- #29 Rename
useComponentContext
/withComponentContext
touseFleurContext
/withFleurContext
- #24 Fix state desynced in useStore
- #21 Improve client side performance (Store changes bounced)
- #20 Support forwardRef
- #19 FleurContext injects
unstable_batchedUpdates
into StoreContext on mounted
- #18 Shorten context prop API
- #15 Internal refactoring to using hooks
- #15 Expose
FleurContext
- #14 Support React Hooks (
useStore
,useComponentContext
added)
f6b95d
Fix typo (StoreGettter
→StoreGetter
)
- #12
connectToStores
now only passinggetStore
tomapStoresToProps
function
- #13 Accept functional component in some API on typing
c4964d7
Unlisten store change events when componentWillUnmount
7e26d63
Loosen peerDependencies versions
ba40c75
UseReact.Component
instead ofReact.PureComponent
inconnectToStores
andwithComponentContext
760a5ab
Fix connectToStores components renews each update
440fe27
Fix to passing received props to child component with connectToStores()
- Improve generated declarations
- Fix incorrect typing in .d.ts
- Improve connectToStores typing
- Store
cotext
prop providing with conneectToStores()
- Fix minor typing (internal)
- Fix testing