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
| function BindingHook({ dataContext, path, mode }) { | |
| const [data, setData] = useState(dataContext[path]); | |
| useEffect(() => { | |
| onPropertyChanged = (newData) => { | |
| setData(newData); | |
| }; | |
| dataContext.subscribeOnPropertyChanged(path, onPropertyChanged); | |
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
| public interface IHasId | |
| { | |
| string id { get; } | |
| } | |
| public class IRepository<Domain> | |
| where Domain : IHasId { | |
| Domain FindById(string id); | |
| } |