Как можно реализовать модальное окно с загрузкой в реакте?
{isFetching && <Preloader />}
-h host
--host=host
Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.
-p port
--port=port
Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.
interface FetchNewsDataSucceededAction {
type: typeof FETCH_NEWS_DATA_SUCCEEDED;
payload: News[];
}
interface FetchNewsDataFailedAction {
type: typeof FETCH_NEWS_DATA_FAILED;
payload: MappedError;
}
type NewsActionTypes = FetchNewsDataSucceededAction |
Action<typeof FETCH_NEWS_DATA_REQUEST> |
FetchNewsDataFailedAction;
const fetchNewsDataRequest = (): NewsActionTypes => ({
type: FETCH_NEWS_DATA_REQUEST,
});
const fetchNewsDataSucceeded = (payload: News[]): NewsActionTypes => ({
type: FETCH_NEWS_DATA_SUCCEEDED,
payload,
});
const fetchNewsDataFailed = (payload: MappedError): NewsActionTypes => ({
type: FETCH_NEWS_DATA_FAILED,
payload,
});
export const fetchNewsData = (): : ThunkAction<Promise<void>, {}, {}, AnyAction> =>
async (dispatch: ThunkDispatch<{}, {}, NewsActionTypes>): Promise<void> => {
try {
const { data } = await Axios.get(`https://api.dtf.ru/v1.6/news/default/recent?count=1`);
dispatch(fetchNewsDataSucceeded(data));
} catch (error) {
dispatch(fetchNewsDataFailed(mapAxiosError(error)));
}
};
пробую создавать макеты в Figma
Готовых сайтов на чистом vue/react + эти библиотеки пока не видел
$('#results').on('change', 'tr', function(e) {
console.log(e, $(this).data('xxx'));
});
function displayLine(data) {
$('#results').append($(`
<tr>
<th scope="row">${importLines.length}</th>
<td><input class="checkbox" type="checkbox"></td>
<td>${data[0]}</td>
<td>${data[2]}</td>
<td>${data[11]}</td>
<td id="status-${data[0]}"><b><span style="color: orange">PENDING</span></b></td>
</tr>
`).data('xxx', data));
}
SELECT sensor_alerts.*, sensor_instances.location
FROM sensor_instances
LEFT JOIN sensor_alerts ON sensor_instances.id = sensor_alerts.sensorid
первые 20 строкLIMIT and OFFSET или FETCH.
const arr = [1,2];
arr.push(3);
const arr = [1,2];
const arr2 = arr.concat(3);
<script src="./../node_modules/react/umd/react.development.js"></script>
<script src="./../node_modules/react-dom/umd/react-dom.development.js"></script>
externals: {
"react": "React",
"react-dom": "ReactDOM"
}
Реальность: все из предыдущего пункта как само собой разумеющееся + знание всех паттернов....