![]() This will eliminate the need to cast to a Date before formatting. The getLastActiveTime() and getLastIdleTime() methods now return Date objects instead of a timestamp. Setting it too low will cause a lot of messaging between tabs. Set it to the maximum amount of drift between timeouts that is tolerable for your project. By default, this property has a value of 0 which is equivalent to disabled. Every user action that is defined in the events array will be replicated to all tabs, thus keeping the timeouts across tabs roughly in sync. It takes a number that represents the throttle value in milliseconds for the sync function. See more about leader election in the next section.Ī new property has been added called syncTimers. Events are emitted on all tabs by default and leader election has been reduced down to the leaderElection prop and the isLeader method. This results in a more simple API surface and less type ambiguity. It is disabled by default.Īll of the rest of the options from v4 have been set to sane defaults. This is how you enable or disable the Cross Tab Reconciliation feature. Now in v5, the crossTab prop only takes a boolean. In v4, the crossTab prop use to take a boolean or an object of configuration options. All the edge cases have been solved and the API surface has been reduced to the essentials. It is now much smaller and more specialized for this particular use case. ![]() The Cross Tab feature has been rewritten from the ground up. A guide on how to do that can be found here. You can use the higher order component to create the IdleTimer component if you wish and it would be a drop-in replacement for the v4 component. It has been replaced with the withIdleTimer higher-order component. The major change in v5 is the removal of the IdleTimer component. Breaking Changes # Removal of Component # Only new features and improvements to existing ones. If you are upgrading from v4 there are a few breaking changes that you should take into account. ![]()
0 Comments
Leave a Reply. |