This file contains hidden or 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
| import React from 'react' | |
| export default function cache(mapPropsToKey, option) { | |
| mapPropsToKey = mapPropsToKey || (() => 'NoCache') | |
| option = option || {} | |
| // 默认最高5层,1000年 | |
| const { | |
| count=5, | |
| expire=3153600000000, |
This file contains hidden or 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
| import { Component, createElement, cloneElement, isValidElement } from 'react' | |
| import { isStream, on, combine } from 'flyd' | |
| export function reactive(tag='') { | |
| class ReactiveClass extends Component { | |
| constructor(props) { | |
| super(props) | |
| this.displayName = `ReactiveClass-${typeof tag==='string' ? tag : (tag.displayName || tag.name || '')}`; | |
| this.state = {} | |
| } |
NewerOlder