[Security Solution] [Sourcerer] useFetchIndex
unified data source access
#154968
Labels
Feature:Sourcerer
Security Solution Sourcerer feature
Team: SecuritySolution
Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
Once this PR has merged, #149360 the security solution should no longer need to rely on component-level state and effects to determine whether it is safe to access certain properties on the specific data source, as all data sources are now typed to be data views, whether you pass in an array of index name strings or a data view id. My ask will be to update all components where we are separately fetching a data view (if a component receives a data view id) and setting associated state within that component and remove those useEffect hooks and associated state and rely on the data view provided by
useFetchIndex
.For example, this:
kibana/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx
Lines 289 to 319 in 2225de0
Can now just become:
The text was updated successfully, but these errors were encountered: